Forum Discussion
Allselected in Matrix Drilldown
- 5 years ago
Hi Mainer04401 , I used some simple data to test and get what you required. Please try below method.
Sample data 'Sales':
Create measures:
Total Sales = SUM(Sales[Total]) Contribution 2 = DIVIDE([Total Sales],CALCULATE([Total Sales],ALLSELECTED(Sales)),0) Contribution 3 = DIVIDE([Total Sales],CALCULATE([Total Sales],ALLEXCEPT(Sales,Sales[Country, State])),0) Final Contribution = IF(ISFILTERED(Sales[City, State]),[Contribution 3],[Contribution 2])Put Final Contribution in the matrix and see the result:
Reference for ISFILTERED: https://docs.microsoft.com/en-us/dax/ISFILTERED-function-dax
Best Regards,
Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.
Hi Mainer04401 , I used some simple data to test and get what you required. Please try below method.
Sample data 'Sales':
Create measures:
Total Sales = SUM(Sales[Total])
Contribution 2 = DIVIDE([Total Sales],CALCULATE([Total Sales],ALLSELECTED(Sales)),0)
Contribution 3 = DIVIDE([Total Sales],CALCULATE([Total Sales],ALLEXCEPT(Sales,Sales[Country, State])),0)
Final Contribution = IF(ISFILTERED(Sales[City, State]),[Contribution 3],[Contribution 2])
Put Final Contribution in the matrix and see the result:
Reference for ISFILTERED: https://docs.microsoft.com/en-us/dax/ISFILTERED-function-dax
Best Regards,
Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.