Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi everyone,
English is not my native language but i'll try to be as precise as possible. Sorry if i'm not clear. Please do ask me more details.
I've been trying to reproduce this excel table in power bi desktop :
It's part of a shop performance evaluation based on a X month period. So in 2021 for eg, the average waiting time in minutes before being assisted is 2mn and 45sec which i converted from the decimal number 2,75 by dividing it by 24, and formatting the result.
In power bi, i've loaded only one table which contains the "waiting time" column in decimal numbers :
In order to display the results in a table, i've created this measure for the 2021 column i'm trying to reproduce :
Here's the table with the same data i used for the excel table screenshot :
The next step was to try formatting the results in MIN:SEC by completing the above dax formula using "FORMAT" :
I'm using MOD in the second part of the FORMAT formula to find the remaining seconds once the minutes in whole numbers have been calculated.
As you can imagine, it didn't work lol.
Would you please have a solution on how i can display those decimal numbers in the same format as the excel screenshot ?
Thanks 🙏
Solved! Go to Solution.
Hi @Anth_NC_QN
Please try
wait time =
VAR WaitTime =
CALCULATE (
AVERAGE ( VM_DATA_QUANTI[waiting time] ),
FILTER ( VM_DATA_QUANTI, VM_DATA_QUANTI[Année] = "2021" )
)
VAR TotalSeconds = WaitTime * 60
VAR Seconds =
MOD ( TotalSeconds, 60 )
VAR Minutes =
QUOTIENT ( TotalSeconds, 60 )
RETURN
TIME ( 0, Minutes, Seconds )
You can then choose you preference of the time format type.
Hi @Anth_NC_QN
Please try
wait time =
VAR WaitTime =
CALCULATE (
AVERAGE ( VM_DATA_QUANTI[waiting time] ),
FILTER ( VM_DATA_QUANTI, VM_DATA_QUANTI[Année] = "2021" )
)
VAR TotalSeconds = WaitTime * 60
VAR Seconds =
MOD ( TotalSeconds, 60 )
VAR Minutes =
QUOTIENT ( TotalSeconds, 60 )
RETURN
TIME ( 0, Minutes, Seconds )
You can then choose you preference of the time format type.
@tamerj1 , spot on !
I'm not used to working with variables (VAR) in power bi. I'll get to it.
Thank you
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
11 | |
10 | |
10 | |
9 |
User | Count |
---|---|
18 | |
13 | |
12 | |
11 | |
8 |