Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
Hello friends.
I need to calculate the average acomulated as a measure to be able to use it in a pivoting matrix (measure), I want to have it as a measure and not creating a calculated column, please need help.
Best greetings.
Solved! Go to Solution.
Hi, try with this measure:
Measure = VAR THEORDER = SELECTEDVALUE ( ESPERA[ORDER] ) RETURN AVERAGEX ( SUMMARIZE ( FILTER ( CROSSJOIN ( ALLSELECTED ( ESPERA[ORDER] ); VALUES ( ESPERA[PLANT] ) ); ESPERA[ORDER] <= THEORDER ); "AVG"; AVERAGE ( ESPERA[HOURS] ) ); [AVG] )
Regards
Victor
Lima - Peru
My buddies.
I want to create a measure to use it in a matrix or different line charts.
I attach my file in One Drive.
Grettings.
@Anonymous
Hi @Anonymous
Yes, respecting the order.
Hi @Anonymous
I try the solution you gave me but the average is the same.
Accumulated = CALCULATE(AVERAGE(ESPERA[HOURS]),GROUPBY(ESPERA,ESPERA[ORDER]))
Hi @rmcneish,
I am a little confused. If you wish to see the output as in your first screenshot, you need to remove "Plant" from the matrix.
Hi @rmcneish,
Try Accumulated = ROUNDUP(CALCULATE(AVERAGE(ESPERA[HOURS]),GROUPBY(ESPERA,ESPERA[ORDER])),1)
and then in the modelling tab, change the format to Decimal number and decimal points to 1.
Is this what you need?
Hi @Anonymous
Thnks for your great support and i valur so much your help, but i wish calculate the accumulated average in any selection of my filters ("#BOARD" and "PLANT").
In the next tablle I show the real calculated by all #BOATS and all PLANTS
Sorry I'm annoying.
Oh I think I get it now 🙂 I think you would have to a table only with order ids and accumulated hours.
Table = DISTINCT(ESPERA[ORDER])
Then create a measure for accumulated hours
Accumulated Hours = Calculate(AVERAGE(ESPERA[HOURS]), filter(ESPERA, ESPERA[ORDER] = 'Table'[ORDER]))
You can also join this table with ESPERA table using order id as primary key.
Hi, try with this measure:
Measure = VAR THEORDER = SELECTEDVALUE ( ESPERA[ORDER] ) RETURN AVERAGEX ( SUMMARIZE ( FILTER ( CROSSJOIN ( ALLSELECTED ( ESPERA[ORDER] ); VALUES ( ESPERA[PLANT] ) ); ESPERA[ORDER] <= THEORDER ); "AVG"; AVERAGE ( ESPERA[HOURS] ) ); [AVG] )
Regards
Victor
Lima - Peru
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Check out the November 2024 Power BI update to learn about new features.
User | Count |
---|---|
91 | |
86 | |
83 | |
76 | |
49 |
User | Count |
---|---|
145 | |
140 | |
109 | |
68 | |
55 |