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.
Dear all,
I'm trying to calculate the YTD Average value - but I would need your help on this KPI & DAX language.
Data are like this:
-> Conformity level (Grade A = OK/NON OK per scan/factory/etc.).
So I would need to calculate the average of grade A/period and then make the average from the beginning of this year until a specified period (ex. P5 - or 31st May).
Hope it's clear - let me know if not.
Best regards
Hervé
Solved! Go to Solution.
@Anonymous , Try like this with a date table
calculate(averageX(values(Table[period]), calculate(sum(Table[grade A]))), datesytd('Date'[Date]))
If you year period, make sure they are in a separate table join to this table
YTD= CALCULATE(saverageX(values(Table[period]), FILTER(ALL('Date'),'Date'[Year]=max('Date'[Year]) && 'Date'[period] <= Max('Date'[period]) ))
LYTD = CALCULATE(averageX(values(Table[period]), FILTER(ALL('Date'),'Date'[Year]=max('Date'[Year])-1 && 'Date'[period] <= Max('Date'[period])))
Hi @Anonymous ,
The link you share isnt available,could you pls modify it and share again?
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Hello @v-kelly-msft
Can you try again please and tell me if it works? (or may be my organization blocks it).
Hervé
Hi @Anonymous ,
Still unavailable,could you pls paste some sample data for test?
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
@Anonymous , Try like this with a date table
calculate(averageX(values(Table[period]), calculate(sum(Table[grade A]))), datesytd('Date'[Date]))
If you year period, make sure they are in a separate table join to this table
YTD= CALCULATE(saverageX(values(Table[period]), FILTER(ALL('Date'),'Date'[Year]=max('Date'[Year]) && 'Date'[period] <= Max('Date'[period]) ))
LYTD = CALCULATE(averageX(values(Table[period]), FILTER(ALL('Date'),'Date'[Year]=max('Date'[Year])-1 && 'Date'[period] <= Max('Date'[period])))
Dear Amitchandak,
I have updloaded the excel sheet -> can you help me having the YTD pbix visual? -> I'm struggling with the formulas.
Hervé
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
98 | |
78 | |
66 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |