Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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)
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 8 | |
| 6 | |
| 6 |
| User | Count |
|---|---|
| 23 | |
| 20 | |
| 18 | |
| 14 | |
| 14 |