Forum Discussion
Vindesh
4 years agoRegular Visitor
Need Help
Hi, I have 3 tables (PrimarySales,SecondarySales and Hierarchy). Territory Column is common among them and i have joined Hierarchy table with PrimarySales and Secondary sales table on common Key(Te...
PaulDBrown
4 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.
Vindesh
4 years agoRegular Visitor
Hierarchy table contains duplicates of territory name since its on brand level.
If any territory is bound to sell more than one brand than for that territory there is more than one record in hierarchy table.So i ahve modified your dax in to below one
FInal Count = CALCULATE(DISTINCTCOUNT(Master[Territory-22]),FILTER(Master,'Measure'[90% SS])).
However this is also not working for all the records correctly because its considering those records also where either one of the conditons is met.
90% SS =
VAR _90Threshold = DIVIDE([Total SS],[Total PS])
VAR _90ThresholdAch = DIVIDE([Total PS],[Total Tgt])
RETURN
IF(AND(_90Threshold > 0.9,_90ThresholdAch > 0.9),1)
In below image you can see for siliguri also it is giving me a count.
- PaulDBrown4 years agoCommunity Champion
Please share some non-confidential sample data or PBIX file