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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply

Change denominator based on store

Hey guys, how's it going?
I have a measure that divides amount of sales by salesperson allocated on each store. for example: 380 sales and 1200 salesperson on store 1.
The thing is, when I use this bar chart, it's dividing 380 by all salesperson on all stores, how do I fix this?

 

Just to be clear, sales is a measure that is CALCULATE(DISTINCTCOUNT()) and a lot of filters
Salesperson is also a CALCULATE(DISTINCTCOUNT()) with fewer filters

Henrique_Quint_0-1713273292862.png

 

2 REPLIES 2
samratpbi
Super User
Super User

Hi,
without looking into your data and measures, its difficult to understand whats going wrong. However as you have mentioned in the measure you have some filters, and you are getting all Salesperson, then something in that measure removing filter context for store which is working fine for Sales. Please check any ALL function used in calculating total Salesperson or not.

Thanks!

Hey! Sorry for that, here are my measures
Sales Measure:

Henrique_Quint_0-1713275260568.png

 

Salesperson measure:

Henrique_Quint_1-1713275283097.png

 

One Column of Sales table (ATIVIDADE FERRAMENT), Ano is year and MeioCaptacao is where a sales was made (on App or website)

 

Henrique_Quint_2-1713275488805.png

Two columns on salesperson tablet (PENMM_DADOS) hat make the demoninator measure, Mind you that Revend/Ciclo column is not the same as the one of the sales table.

Henrique_Quint_3-1713275620442.png

 

Here are the relations between them, this 2Dimensão_VD is a third table that connect visuals between other stuff

Henrique_Quint_4-1713275775348.png

 

Hope that now you can help me, cheers 😃

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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