Forum Discussion
Need Help
Ok, you need a couple of measures (+ the sum for the sales in each table)
Sales 1 where S2 > 90% =
VAR _90Threshold =
DIVIDE ( [Sum Sales 1], [Sum Sales 2] )
RETURN
IF ( _90Threshold > 0.9, 1 )
Final =
SUMX(VALUES('Hierarchy'[Region]), [Sales 1 where S2 > 90%])
Hi,
Many thanks for your reply ans yes same objective even i want to achieve which i rflecting in your image.However,request you to explain bit in detail for measure creation part.
- PaulDBrown4 years agoCommunity Champion
The first measure, [
Sales 1 where S2 > 90%Returns the value 1 when the division of the primary sales by the secondary sales is greater than 0.9 (90%)
The second measure,
FinalSums these 1 values to obtain the total.
I've attached the sample PBIX file for you
- Vindesh4 years agoRegular Visitor
Hi
Many thanks, this has worked for me.
However, one challange is it is giving me count which include duplicates territory names since my hierarchy table contains duplicates.
Not able to figure out to hoe to get distinct count in sumx.
Please guide/help
- PaulDBrown4 years agoCommunity Champion
I'm not sure what you mean. The relationships stemming from your Hirarchy table are on the "One" side, which means they are unique values. There should be no duplicates.