Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hey I seem to be having an issue using hh:mm:ss format measures in Power BI charts. (Bar, line, area, etc) I try to drag the measure to any of the axis spots (x, y, line) and nothing happens, it wont drop that measure into the axis spot. Even if I go with table, bring the field in and then switch visual to a chart it puts the field in the "Tooltips" section.
The field is a measure and this is the code. Any ideas? I have that measure formatted as (h:mm:ss) also tried different variations of times. Tried dividing by 1 or multipying by 86400. Neither worked.
@CarterB13 Chelsie Eiden's Duration - Microsoft Power BI Community
Thanks for the info. So do I just create a new measure using this code? This seems like it wouldnt work based on the calculation I am using in my measure. I am still learning dax, so excuse any dumb questions.
*AvgSpeedOfAnswer = TIME(0,0,CALCULATE(SUM('Interactions'[QueueTime_s]),filter('Queues','Queues'[IsInbound]=1),FILTER('Interactions','Interactions'[IsAnswered]=1))/SUM('Interactions'[IsAnswered]))
Chelsie Eiden's Duration = // Duration formatting // * @konstatinos 1/25/2016 // * Given a number of seconds, returns a format of "hh:mm:ss" // // We start with a duration in number of seconds VAR Duration = SUM([Duration]) // There are 3,600 seconds in an hour VAR Hours = INT ( Duration / 3600) // There are 60 seconds in a minute VAR Minutes = INT ( MOD( Duration - ( Hours * 3600 ),3600 ) / 60) // Remaining seconds are the remainder of the seconds divided by 60 after subtracting out the hours VAR Seconds = ROUNDUP(MOD ( MOD( Duration - ( Hours * 3600 ),3600 ), 60 ),0) // We round up here to get a whole number RETURN // We put the hours, minutes and seconds into the proper "place" Hours * 10000 + Minutes * 100 + Seconds
@CarterB13 The key takeaway is that you need to get your duration into the appropriate form and then apply a custom format string.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |