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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
ThomasJB2004
Regular Visitor

Problems with creating a certain type of column chart

Morning,

 

This is my first time on here so i am hoping someone knows how to help me.

 

I am trying to create a ''Visual'' with a 2 columns both showing the result of their total.

 

I want to compare the 'sales' in % but for each company i want the % of their total sales and not the % of all (merged) sales - this way i can compare fairly how much of each product gets sold per company. i know this is easy to show in 2 visuals next to eachother but for space reasons and the looks this will work great! 

 

 

i hope this is enough information provided to get an anwser!

 

PS: I added a test data to show my question - the data is made the simplest i could

https://kpn1271380.sharepoint.com/:u:/g/Ee-2Z_oHHY1Orib_55dRVLMBKVqqOUv12E9w_0Z1leE2aA?e=Yh2S3B 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @ThomasJB2004 

May I ask if this is the expected output you are looking for? Based on your description, I have created many measures to achieve the effect you are looking for. Following picture shows the effect of the display.

vyaningymsft_4-1703728994915.png

 

Measures:

 

A =

VAR _A =

    CALCULATE ( SUM ( 'Sheet 1'[Type of Product] ), 'Sheet 1'[Company ] = "A" )

VAR _totalA =

    CALCULATE (

        SUM ( 'Sheet 1'[Type of Product] ),

        'Sheet 1'[Company ] = "A",

        ALL ( 'Sheet 1' )

    )

RETURN

    DIVIDE ( _A, _totalA )



B =

VAR _B =

    CALCULATE ( SUM ( 'Sheet 1'[Type of Product] ), 'Sheet 1'[Company ] = "B" )

VAR _totalB =

    CALCULATE (

        SUM ( 'Sheet 1'[Type of Product] ),

        'Sheet 1'[Company ] = "B",

        ALL ( 'Sheet 1' )

    )

RETURN

    DIVIDE ( _B, _totalB )

 

If this does not work, could you please share some sample data without sensitive information and expected output.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi, @ThomasJB2004 

May I ask if this is the expected output you are looking for? Based on your description, I have created many measures to achieve the effect you are looking for. Following picture shows the effect of the display.

vyaningymsft_4-1703728994915.png

 

Measures:

 

A =

VAR _A =

    CALCULATE ( SUM ( 'Sheet 1'[Type of Product] ), 'Sheet 1'[Company ] = "A" )

VAR _totalA =

    CALCULATE (

        SUM ( 'Sheet 1'[Type of Product] ),

        'Sheet 1'[Company ] = "A",

        ALL ( 'Sheet 1' )

    )

RETURN

    DIVIDE ( _A, _totalA )



B =

VAR _B =

    CALCULATE ( SUM ( 'Sheet 1'[Type of Product] ), 'Sheet 1'[Company ] = "B" )

VAR _totalB =

    CALCULATE (

        SUM ( 'Sheet 1'[Type of Product] ),

        'Sheet 1'[Company ] = "B",

        ALL ( 'Sheet 1' )

    )

RETURN

    DIVIDE ( _B, _totalB )

 

If this does not work, could you please share some sample data without sensitive information and expected output.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Hi @Anonymous 

 

Thanks for the solution, it works exactly as i intended !

 

Ritaf1983
Super User
Super User

Hi @ThomasJB2004 

To achieve the desired result you can create 2 measures :

A percent = DIVIDE(CALCULATE(sum('Sheet 1'[Type of Product]),'Sheet 1'[Company ]="A"),sum('Sheet 1'[Type of Product]))
B percent = DIVIDE(CALCULATE(sum('Sheet 1'[Type of Product]),'Sheet 1'[Company ]="B"),sum('Sheet 1'[Type of Product]))
and put them on Y axis:
Ritaf1983_0-1703217002105.png

If this post helps, then please consider Accepting it as the solution to help the other

members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.