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
NatalieTlash
New Member

Count Measure with same grand total for all categories in stacked column chart, THANK YOU

Hi! I am a big fan of this community! 🤗 I search all my Power BI questions in here and always have an answer from previusly asked questions. This time I am posting my own question because unfortunately couldn't find similar post. Appriciate a lot if you could help 🙂 🙂 🙂 I am really really stuck. 

 

I have EEs table with thousands of EEs for each period with below data:

PeriodEE#Profit Center  Grade

2020Q1

  1

  223
2020Q1  2  445
2020Q2  1  223
2020Q2  2  335
2020Q2  3  447

 

I also have a table with all EEs salary components:

PeriodEE#CategoryUSD

2020Q1

  1

Base Salary20000  
2020Q1  1Bonuses5000
2020Q1  2Base Salary40000  
2020Q1  2Bonuses4000
2020Q1  2Leasing500

 

I have a one to many connection between the 2 tables using combined column of period & EE#.

 

I now need to calculate average salary for every period which will be dinamic and I will be ably to slice/filter it by profit center and other parameters. So I used DIVIDE() measure, but my problem is when I present it in stacked collumn chart with Category as legend - I notice that the average salary is calculated separatly for each Category using total EEs in each caltegory - in the example 2 EEs in Base Salary, 2 in Bonuses and 1 in Leasing. I would like to have same total of EEs in every category - which is total EEs I have in each period - 2 in Q1, 3 in Q2. Is it possible? I tried ALL, ALLSELECTED, ALLEXCEPT.

 

Appriciate a lot for any direction!!!

Thank you

Natalie

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@NatalieTlash I'm not 100% what you want. Try making your relationship bi-directional? What is your measure formula and what is your expected output? 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
NatalieTlash
New Member

Thank you Greg! You are right, the issue was the relationship between the tables, it was bi directional and should be one direction! You are such a pro 😃

Greg_Deckler
Super User
Super User

@NatalieTlash I'm not 100% what you want. Try making your relationship bi-directional? What is your measure formula and what is your expected output? 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.

Top Solution Authors