Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
I'm working on taking a count of minutes, and breaking it into days, hours and minutes. I got the majority of the DAX coding working, but if the minutes is exactly an hour (60 minutes, 120 minutes, etc), the 'Total Minutes' VAR is blank, so the result is "1 Hour, Minutes." How can I default VAR Total Minutes to "0" if it is exactly an hour.
Solved! Go to Solution.
Course Time =
VAR TotalMinutes = SUM( 'Course Information'[MIN] )
VAR TotalDays = DIVIDE( TotalMinutes, 1440, 0)
var days = INT( TotalDays )
Var remainingHours = MOD( COALESCE( TotalDays,0 ), 1 ) * 24
Var hours = INT( remainingHours )
Var remainingMins = MOD( COALESCE( remaingHours, 0 ), 1 ) * 60
Var mins = INT( min )
Return
If( days > 0, days & " days " ) &
If( hours > 0, hours & " hours ") &
If( mins > 0, mins & " minutes")
Hi,
While the if logic will also work you can easily do something like this:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
Proud to be a Super User!
Hi,
While the if logic will also work you can easily do something like this:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
Proud to be a Super User!
Course Time =
VAR TotalMinutes = SUM( 'Course Information'[MIN] )
VAR TotalDays = DIVIDE( TotalMinutes, 1440, 0)
var days = INT( TotalDays )
Var remainingHours = MOD( COALESCE( TotalDays,0 ), 1 ) * 24
Var hours = INT( remainingHours )
Var remainingMins = MOD( COALESCE( remaingHours, 0 ), 1 ) * 60
Var mins = INT( min )
Return
If( days > 0, days & " days " ) &
If( hours > 0, hours & " hours ") &
If( mins > 0, mins & " minutes")
Misread the request just use
COALESCE( minutes, 0)
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
24 | |
19 | |
14 | |
10 | |
7 |