Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Lucya79
Frequent Visitor

Include a filter page in a dax market share and rank formula

Hi,

I’m struggling with a market share and rank measures already for a week. No idea how to solve this problem.

Here is my concern:

I have a data set with a thousand products in hierarchy something like this: 

  • Country
  • Class
    • Product Global Brand
      • Local product
        • Pack presentation 

I need to calculate the local market share (%) for our products which is based always on the Class, so a particular Class will be the 100% of all products’ sales in that class. After I have to show the local market share values in a table. 

I had previously created this same calculation in another report with two filters on the page (see picture and formula below). This formula was for one specific product, thus I had one product per slide in that report.

 

Product Market Share per Country = CALCULATE([SalesEUMNF],'DATA DB'[Product Grouped]="XXXX")/CALCULATE([SalesEUMNF],ALL('DATA DB'[Product Grouped]))

Lucya79_10-1605716793037.png

As I need to show now all products in one slide by using a product slicer, I’ve tried to adapt this market share calculation by adding the filter page “Class” to the formula. Is it that possible? I have tried several ways and no idea how to make it work.   

 

Same concern for the local rank. I would like to add the filter page “Class” to this formula:

Local Product Rank = RANKX(ALL('DATA DB'[Product Grouped]),CALCULATE(SUM('DATA DB'[Value]),'DATA DB'[Unit]="LEU/MNF"))

Lucya79_0-1605724853581.png

 

 

Any help will be greatly appreciated!!

1 REPLY 1
V-lianl-msft
Community Support
Community Support

Hi @Lucya79 ,

 

Please refer to the blog:

https://blog.enterprisedna.co/find-your-top-3-salespeople-per-region-automatically-in-power-bi-using... 

If the problem persists,could you share the sample pbix via cloud service like onedrive for business?

Please remove any sensitive data before uploading.

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.