The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
108 | |
78 | |
77 | |
46 | |
39 |
User | Count |
---|---|
137 | |
108 | |
64 | |
64 | |
53 |