Is there any way of creating a measure which would tell the amount of (non-subtotal) rows in the pivot table?
I have a dimension table which contains multiple levels of product group hierarchy, and any of those levels may be set on rows on the pivot table. What I would like to have is a measure which tells how many (distinct) product groups there are in the level currently on rows.
CALCULATE(DISTINCTCOUNT(dGroups[Product_Group_lv1]);ALLSELECTED(dGroups)) works fine when the row dimension is static (always Product_Group_lv1, in this case). I could of course write such a measure for each level of hierarchy and then use ISFILTERED to figure out which one is active, but the solution is not as elegant as I would like.
I have a dimension table which contains multiple levels of product group hierarchy, and any of those levels may be set on rows on the pivot table. What I would like to have is a measure which tells how many (distinct) product groups there are in the level currently on rows.
CALCULATE(DISTINCTCOUNT(dGroups[Product_Group_lv1]);ALLSELECTED(dGroups)) works fine when the row dimension is static (always Product_Group_lv1, in this case). I could of course write such a measure for each level of hierarchy and then use ISFILTERED to figure out which one is active, but the solution is not as elegant as I would like.