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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Tocosta
Frequent Visitor

Problem calculating the Market Share

Hello!

 

I have an issue calculating the market share.

 

I need to make a formula with the market share of the company in each zone divided with the market share of the company in all the zones. 

 

I have a table with.

Company name |  Quantity of Sales | ZONE

 

can anyone help me with this issue with a DAX formula?

 

thanks!

9 REPLIES 9
Anonymous
Not applicable

Hi @Tocosta,

Can you please share some dummy data with a similar data structure and expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Jihwan_Kim
Super User
Super User

Hi, @Tocosta 

I am not sure if I understood correctly your question, but I tried to create a sample pbix file based on the explanation.

please check the below picture and the sample pbix file's link down below.

all measures are in the sample pbix file.

Picture3.png

 

https://www.dropbox.com/s/wwzxke8n1n6lqer/tocosta.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Can you please paste me here the measures? I have an older version of power BI and I cant open the file.

 

thanks!!

Hi, @Tocosta 

Please check the below.

 

Sales Total =
SUM(Sales[Sales])
 
 
Sales Total by Zone =
CALCULATE( [Sales Total], REMOVEFILTERS(Sales[Company Name]))
 
Sales Total by Company =
CALCULATE( [Sales Total], REMOVEFILTERS( Sales[Zone]))
 
MarketShare in each zone =
DIVIDE( [Sales Total], [Sales Total by Zone])
 
MarketShare all zone =
DIVIDE( [Sales Total by Company], CALCULATE( [Sales Total], ALL()))
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Sorry, I cant solve it. perhaps with this photo you can help me.

 

 

 

Tocosta_0-1620741379363.png

 

Hi, @Tocosta 

The above measures that I wrote are working when the model is a very simple model.

You have to modify a bit if your model is not very simple.

Please share your sample pbix file's link here, then I can try to look into it to come up with more accurate measures.

Without seeing your model, it is quite difficult for me to write accurate DAX measures.

Thank you.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Jihwan_Kim
Super User
Super User

Hi, @Tocosta 

I am not sure if I understood correctly your question, but I tried to create a sample pbix file based on the explanation.

please check the below picture and the sample pbix file's link down below.

all measures are in the sample pbix file.

 

Picture3.png

 

https://www.dropbox.com/s/wwzxke8n1n6lqer/tocosta.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
selimovd
Super User
Super User

Hello @Tocosta ,

 

maybe share some data and how you want to calculate it.

It's a little challenging to help you with that little information.

 

Best regards

Denis

Hi Denis,

 

I have a table with the following iformation

 

Tocosta_0-1620735309422.png

the company name and the zone can be repeted, but the ID colum is unique. 

 

I need a formula that calculate the market share of each company in each zone. 

then I need a formula that calculate the market share of each company without filter the zone.

So then I can make a Divide formula of the market share of the zona with the market share of the country

 

this should be the result

 

Tocosta_1-1620735640328.png

 

 

 

thanks!

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors