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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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!:
Mastering Power BI 2nd Edition

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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors