Forum Discussion

Gazi's avatar
Gazi
Frequent Visitor
8 years ago
Solved

Recursive DAX for Hierarchy

Hi everyone!

 

I have the following DAX statement to calculate AVG count for one level below (Thanks to Lydia! Anonymous)

average = CALCULATE(COUNTA(Table[Item]),ALLEXCEPT(Table,Table[Product],Table[Item]))/CALCULATE(DISTINCTCOUNT(Table[Children]),ALLEXCEPT(Table,Table[Product]))

 

 

But problem is I have 9 levels in hierarchy. Any ideas how to extend this DAX statement??

 

Many many thanks!!

1 Reply