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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
matkvaid
Helper III
Helper III

Incorrect totals with legend in stacked chart

Hi, 

stuck here. I need to show amount by worked hours and with different categories. My worked hours are in one table, amount in another and categorisation in other, also employees etc in few different. I have created measure - DIVIDE, total amount / work hours. And everything works as it has to, until i add categories to chart legend. Then my working hours are also divided and total sum is wrong. What i need - total amount for category 1 divided by all worked hours, total amount for category 2 divided by same working hours. I am doing something wrong?Untitled.png

1 ACCEPTED SOLUTION
matkvaid
Helper III
Helper III

So i found a solution, this can be closed or maybe deleted. Sorry for repeating 🙂 Solved: Show Total in Stacked Column Chart with legend - Microsoft Power BI Community

View solution in original post

6 REPLIES 6
matkvaid
Helper III
Helper III

So i found a solution, this can be closed or maybe deleted. Sorry for repeating 🙂 Solved: Show Total in Stacked Column Chart with legend - Microsoft Power BI Community

and also i am just stupid maybe, this was all in table relationships... i changed filtering direction, because filtered category changed number of people and then worked hours... 🙂

matkvaid
Helper III
Helper III

Sorry, this is not full information, if put only worked hours here, without categories in legend, total is 104, with categories only 88Untitled.png

Do you have any data without BLANK in column [ordered from] ?

there is some blank fields, but here is selected one day and in this there are no blanks. i htink i am doing something wrong here, and need idea how to do it. because hours are not related to categories. this is just total sales and total working hours with different 'ordered from', many orders and i need just amout per total worked hours

AilleryO
Memorable Member
Memorable Member

Hi,

 

I do not really understand the problem because for me the total seems to be correct 203+105=308 ?

In case you need to calculate the total hours without the category filter, you can use ALL(Category) in your formula to bypass the category filter.

The category filter I'm talking about is the one produced by adding the category to your visual.

So it will be something like :

CALCULATE( SUM( YourColumn ) , ALL(Category) )

 

Hope it helps

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.