Forum Discussion
hierarchy row counts
- 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 :)
can you elaborate a little?
the table you show is what you have or what you want?
this calculations will be done in this table or are you building new measures for this ?
help me understand,
in your table,
Site:Grove has OEM RANK = 1
but it should be 7
is that your problem?
You can ignore OEM rank for the level at which Grove sits. That rank only applies to the actaul OEM's which are under Grove.
I simply need on each row under Grove to acquire the row count of distinct OEM's only under Grove (this formula would be used for all other sites in the hierarchy as well), but in the example pic just Grove for now). The count of distinct rows for Grove should come out to 7 to be used in a DAX formula on each row under Grove.
- Nickgastaldi7 years agoResolver I
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 :)
- mjcuccia7 years agoFrequent Visitor
Crushed it! Thanks Nickgastaldi! Answer was like this:
hier-count = CALCULATE( DISTINCTCOUNT( mytable[OEM] ) ,ALLEXCEPT(myTable , myTable[Site]) )