Forum Discussion

mjcuccia's avatar
mjcuccia
Frequent Visitor
7 years ago
Solved

hierarchy row counts

I have a need to get the row count for a particular level in my hierarchy to use that value in each child row of that hierarchy level.   In the example below, I would want the number of rows under ...
  • Nickgastaldi's avatar
    Nickgastaldi
    7 years ago

    cant test to guarantee , but you can try something like this

     

    hier-count = 
    CALCULATE( DISTINCTCOUNT( mytable[id] )
                                ,ALLEXCEPT(myTable ,
                                   myTable[Grove])
                 )

    hope this is understandable :)