This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi All,
I was trying to format total duration in hh:mm:ss format in a matrix visual.
I wanted to show those employees with duration>100 sec or transactions>20.
I could create a measure for duration logic but when I format it to hh:mm:ss, it gives me 0.
I also want to exclude employees with blank in both duration and transaction.
Please help me on this.
Power bi file
https://drive.google.com/file/d/1MrKuxlT-hocLWRQK5kMujW3J-RRd2-Za/view?usp=sharing
Solved! Go to Solution.
Hi @Jos13 ,
Please try this:
Measure =
var _hour=TRUNC([Total Duration]/3600)
var _min= TRUNC( MOD([Total Duration],3600) /60)
var _sec=MOD( MOD([Total Duration],3600),60)
return IF([Total Duration]>100 || [Total Transactions]>20 , TIME(_hour,_min,_sec),BLANK())
After uncheck the Show items with no data options, the final output is shown below:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Jos13 ,
Please try this:
Measure =
var _hour=TRUNC([Total Duration]/3600)
var _min= TRUNC( MOD([Total Duration],3600) /60)
var _sec=MOD( MOD([Total Duration],3600),60)
return IF([Total Duration]>100 || [Total Transactions]>20 , TIME(_hour,_min,_sec),BLANK())
After uncheck the Show items with no data options, the final output is shown below:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Jos13 , for duration first have measure
Total duration = sum(Table[duration])
Duration as Duration =Quotient([Total duration ],3600) &":" & Quotient(mod([Total duration ],3600),60) &":" & mod(mod([Total duration ],3600),60)
Filter > 100
Sumx(filter(summarize(Table, Table[reporting to] , Table[Employee], "_Duration" , [Total duration],"_trans",[Total Transactions] ) , _Duration >100 && _trans >20),[_Duration])
Again use the duration code
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 35 | |
| 32 | |
| 26 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 68 | |
| 36 | |
| 32 | |
| 25 | |
| 23 |