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 moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
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
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
87 | |
76 | |
74 | |
55 | |
45 |
User | Count |
---|---|
117 | |
106 | |
77 | |
66 | |
65 |