Forum Discussion
Anonymous
5 years agoNot applicable
YTD Average - DAX calculation
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.)...
- 5 years ago
Anonymous
pls try this
Measure = DIVIDE(CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[CONFORMITY]="OK")),COUNTROWS('Table')) - 5 years ago
Anonymous
pls change year to rclms_qa[year]
Anonymous
5 years agoNot applicable
Strange - yes, my column name is "year"
ryan_mayu
Super User
5 years agoAnonymous
pls change year to rclms_qa[year]
- Anonymous5 years agoNot applicable
Thanks a lot for your help - it works
- Anonymous5 years agoNot applicable
And I have another question to complexify a bit.
Can you the created formula:
YTD 2021 = Divide(CALCULATE(COUNTROWS(rclms_qa), FILTER(rclms_qa,rclms_qa[CONFORMITY]="OK"&&rclms_qa[Mars Year]=2021)),CALCULATE(COUNTROWS(rclms_qa), FILTER(rclms_qa,rclms_qa[Mars Year]=2021)))*100And add some DAX elements to get the results of my last 13 periods?ThanksHervé