Forum Discussion
Displaying ISINSCOPE
- 7 years ago
You can easily solve the issue by converting you model to a Star Schema.
1. Create 2 new tables as below:
Company = DISTINCT('Table'[Company]) Product = DISTINCT('Table'[Product Type])2. Create 2 new relationships:
Table[Company] <- Company[Company]
Table[Product Type] <- Product[Product Type]
3. Now replace the dimensions in your existing visuals & slicers with the columns from the new Lookup tables.
4. Just use the same old measure for Market Share:
Market Share = DIVIDE ( [Total Value], CALCULATE ( [Total Value], ALL ( 'Table'[Company] ) ) )
The issue you faced is happening because of the Auto Exists feature in DAX.
Hi AkhilAshok,
I'm still getting 36% from that code in the same scenario?
To be clear, if the slicer is completely deselected, the correct 32.6% shows. But with all three selected, it shows 36%.
I need to select all three because in the real data, I have more than those 3 slicers.
Hopefully that makes sense
Thanks again for your response.
You can easily solve the issue by converting you model to a Star Schema.
1. Create 2 new tables as below:
Company = DISTINCT('Table'[Company])
Product = DISTINCT('Table'[Product Type])2. Create 2 new relationships:
Table[Company] <- Company[Company]
Table[Product Type] <- Product[Product Type]
3. Now replace the dimensions in your existing visuals & slicers with the columns from the new Lookup tables.
4. Just use the same old measure for Market Share:
Market Share = DIVIDE ( [Total Value], CALCULATE ( [Total Value], ALL ( 'Table'[Company] ) ) )
The issue you faced is happening because of the Auto Exists feature in DAX.
- Reigning_data7 years agoFrequent Visitor
You, Sir
are magnificent!