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

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.

Reply
tomb0
Frequent Visitor

measure time average for line and clustered chart

im trying to make a line and clustered chart
that shows Date to average lead time.

tomb0_0-1630054935551.png

lead time pid = CALCULATE(FORMAT(AVERAGE(PID[Leadtime]),"HH:MM:SS"),
PID[Reason Description]="Unplanned Physical Inventory"||PID[Reason Description]="Putaway Physical Inventory")
 
the Calculate formula i can do in the filter of the chart to. but then it also not work.
the only place i can put the measure is in the Tooltips

many thank in advance
Tom,
1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @tomb0,

Format function will convert the target value to text with specific text formats.
AFAIk, text value can't be aggregated with common math modes(e.g. sum, average, max, min...), so power bi will forced use 'count' mode to summary these type of values if you use them on the chart value field which only allows the aggregated values.

BTW, current power bi data model tables do not support duration type and you can't do aggregate on the date or time values, I'd like to suggest you convert them to 'total second' values then you can simply do aggregate on them.

Aggregating Duration/Time - Microsoft Power BI Community

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @tomb0,

Format function will convert the target value to text with specific text formats.
AFAIk, text value can't be aggregated with common math modes(e.g. sum, average, max, min...), so power bi will forced use 'count' mode to summary these type of values if you use them on the chart value field which only allows the aggregated values.

BTW, current power bi data model tables do not support duration type and you can't do aggregate on the date or time values, I'd like to suggest you convert them to 'total second' values then you can simply do aggregate on them.

Aggregating Duration/Time - Microsoft Power BI Community

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.