Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I am wanting to calculate the median of a column that has time values. And I want it to be formatting like hh:mm:ss.
Column Example:
Time to Contact
00:11:04
00:21:32
00:13:54
00:12:43
I am using the measure:
= FORMAT(MEDIAN(Table1[Time to Contact]), "HH:MM:SS")
I am geting the error "MEDIAN does not support expressions of type string/Boolean/date
Any help?
Solved! Go to Solution.
only two step to solve this situation.
first) set new column to set date to second(like unix timestamp)
tosecond = TIMEVALUE(TABLE1[timeconcat]) *1
second)set measure to median your second and convert back to time with DAX FORMAT
measure = FORMAT(MEDIAN(TABLE1[tosecond]),"hh:mm:ss")
I hope it could help you.
only two step to solve this situation.
first) set new column to set date to second(like unix timestamp)
tosecond = TIMEVALUE(TABLE1[timeconcat]) *1
second)set measure to median your second and convert back to time with DAX FORMAT
measure = FORMAT(MEDIAN(TABLE1[tosecond]),"hh:mm:ss")
I hope it could help you.
Thank You!!
if you works well,pls give a thumb(umm kudo?) for me,thks.
send me message if you me other problem.
Times can be cast into floating point #'s... (each increment by 1.0 is 1 full 24-hour day).
I want to say VALUE( ) is the function to use for casting?
Thanks!
How would I structure the new measure?
I suspect if just create a new calc column where your time is a floating point number... your above measure will "just work"
User | Count |
---|---|
76 | |
75 | |
46 | |
31 | |
27 |
User | Count |
---|---|
99 | |
91 | |
51 | |
49 | |
46 |