Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
UmairKamal
Helper I
Helper I

Measure not display in chart

Dear Users,

 

The measure I have is the total time spent by a person doing a task. and this works fine in a table however, it does not work in any graphs. I understand that this is because the measure is calculated and then recognised as a text. however, I am unable to find a solution to this problem. 

 

The DAX code I have used to calculate the measure is as follows:

 

Total Time Spent =

VAR Total_Hours = SUMX(Table1,HOUR(Table1[Time Spent (hh:mm:ss)]) + DIVIDE(MINUTE(Table1[Time Spent (hh:mm:ss)]),60) + DIVIDE(SECOND(Table1[Time Spent (hh:mm:ss)]),3600))

VAR DaysTotal = DIVIDE(Total_Hours,24)

VAR HoursTotal = (DaysTotal)*24

VAR HoursInt = TRUNC(Total_Hours)

VAR MinutesTotal = (HoursTotal - HoursInt) * 60

VAR MinutesInt = TRUNC(MinutesTotal)

VAR SecondsTotal = ROUND((MinutesTotal - MinutesInt)*60,0)

RETURN

FORMAT(HoursInt,"00")&":"&FORMAT(MinutesInt, "00")&":"&FORMAT(SecondsTotal, "00")&" "

 

Please advise how to solve this issue?

 

3 REPLIES 3
Anonymous
Not applicable

Hi @UmairKamal ,
Here some steps that I want to share, you can check them if they suitable for your requirement.
Here is my test data:

vheqmsft_0-1715324985712.png

Using the format function does force a conversion to text formatting.However only digital format displays are accepted on most visual objects. With this in mind, we can use the dynamic format of measure.
First, ensure that the options in the preview feature are turned on

vheqmsft_2-1715325224038.png

Create a measure

 

 

Measure = HOUR(SELECTEDVALUE('Table'[Time]))*10000+MINUTE(SELECTEDVALUE('Table'[Time]))*100+SECOND(SELECTEDVALUE('Table'[Time]))

 

 

Ensure that the y-axis diapaly units option is none

vheqmsft_3-1715325379658.png 
Final output

vheqmsft_4-1715325451178.png

Best regards,
Albert He

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

@Anonymous thanks for your reply. I have followed the steps as you mention but I am not getting the results. In fact, this measure is not even visible in the Matrix Visual. 

 

Total Time 10 = HOUR(SELECTEDVALUE('Report'[Time Spent (hh:mm:ss)]))*10000+MINUTE(SELECTEDVALUE('Report'[Time Spent (hh:mm:ss)]))*100+SECOND(SELECTEDVALUE('Report'[Time Spent (hh:mm:ss)]))
 
 
KRISHP1234
Helper I
Helper I

It may return Blank values.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors