Forum Discussion
YTD Average
- 5 years ago
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])))
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])))
- Anonymous5 years agoNot applicable
Dear Amitchandak,
I have updloaded the excel sheet -> can you help me having the YTD pbix visual? -> I'm struggling with the formulas.
Hervé