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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
jeanilieski
Frequent Visitor

Line and Stacked Column Chart with categories in the bars

Hi community. This seems to be easy but I stil cannot find the solution. I have a simply data set with one year of sales (please see sample):

jeanilieski_1-1686664020540.png

 This I can achive in my visualisation (blue bars actual Sales; yellow line Business Plan). However, I also need to see what categories (companies in my case) create the monthly sales (as I marked with red i.e. in March to May). I use for this reason the "Line and Stacked Column Chart".  Please give me a hint on how to achive this. Many thanks!

jeanilieski_0-1686663646981.png

 

1 ACCEPTED SOLUTION

Hi @jeanilieski ,

 

You can create a new measure to be placed on the [column y-axis].

_YTD EnergySold = 
SUMX(
    SUMMARIZE(
        'Table',
        'Table'[MMM],
        'Table'[company name],
        "total",[TotalEnergySold] //your measure
    ),
    [total]
)

vtangjiemsft_0-1686819625983.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

3 REPLIES 3
v-tangjie-msft
Community Support
Community Support

Hi @jeanilieski ,

 

Place [Company Name] on the [Column Legend].

vtangjiemsft_0-1686795269369.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

 

Dear Supporter, I tryed your way but it does not work for me since I use TOTALYTD Measures and in your example you use the sum of the columns (non-Measures). You can see the formulas and the desired outcome in the screenshot. I need to the categories from the right-hand side summed up in the within the blue bars of the left-hand side chart. Example: In Jan I have 26, broken down to 4 categories (8+12+1+5). I need to see these 4 categories in Jan bar in the left-hand side chart. In Feb I would like to see the 51 broken in 4 categories (8+11=19 for the purple), (12+5=17 for the green), (1+8=9 for yellow), (5+1=6 for blue) =>  that would give me the sum of 51 (19+17+9+6=51). Same for the rest of the months. Maybe I need to combine two charts to achive this?  

jeanilieski_0-1686816705618.png

 

Hi @jeanilieski ,

 

You can create a new measure to be placed on the [column y-axis].

_YTD EnergySold = 
SUMX(
    SUMMARIZE(
        'Table',
        'Table'[MMM],
        'Table'[company name],
        "total",[TotalEnergySold] //your measure
    ),
    [total]
)

vtangjiemsft_0-1686819625983.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

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