Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello!
I have a table with with products and sales where the products are in different categories and have different manufacturers.
I have a table visual where i can filter on manufacturer and see the sales but what i would like is to have the market share for all the products in their respective category despite the filtered manufacturer.
Right now if i select 3 categories and 1 manufacturer, the %share only shows the share for the total amount of the products listed in the visual.
So i would like to take (sales for that product) divided by the total sales in that products category no matter which categories are filtered and by all manufacturers no matter which manufacturer is filtered.
Im sure there is an easy way to do this but i cant figure it out right now..
Solved! Go to Solution.
Hi @Trolleri ,
In your scenario, we can use ALL() to remove all filters to get the total sales amount, please refer to the following DAX query:
Measure = DIVIDE(SUM(Table1[Sales]),CALCULATE(SUM(Table1[Sales]),ALL(Table1)))
The result will like below:
Best Regards,
Teige
Hi @Trolleri ,
In your scenario, we can use ALL() to remove all filters to get the total sales amount, please refer to the following DAX query:
Measure = DIVIDE(SUM(Table1[Sales]),CALCULATE(SUM(Table1[Sales]),ALL(Table1)))
The result will like below:
Best Regards,
Teige
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
94 | |
83 | |
67 | |
59 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |