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
Poongovil
Frequent Visitor

100% Staked Column Chart is not working

New to power BI; Still learning ... So please excuse.

 

I have created the below pivot table. Want to create a 100% Stacked Column chart as shown below in the table with 4 stacked bars. 

Poongovil_0-1597824854523.png

Excel Output

Poongovil_2-1597825469861.png

 

But I do receive only the below chart with three stacks in Power pivot. Please help !!!

What should i do to get the excel output. Thanks !!!

Poongovil_1-1597825100978.png

 

1 ACCEPTED SOLUTION

Hi @Poongovil ,

 

I created a measure and used level as a legend.

 

Measure =
VAR COUNT_BY_LEVEL =
    CALCULATE (
        COUNT ( 'Table'[ID] ),
        ALLEXCEPT ( 'Table', 'Table'[ID type], 'Table'[level] )
    )
VAR COUNT_BY_TYPE =
    CALCULATE ( COUNT ( 'Table'[ID] ), ALLEXCEPT ( 'Table', 'Table'[ID type] ) )
RETURN
    DIVIDE ( COUNT_BY_LEVEL, COUNT_BY_TYPE )

 

V-lianl-msft_0-1597905548157.png

Sample .pbix

If the problem persists,could you share the sample pbix  or sample data?(Please mask any sensitive data before uploading.)

 

Best Regards,
Liang
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

5 REPLIES 5
pranit828
Community Champion
Community Champion

HI @Poongovil 

 

Unpivot these 4 data columns and use it in the fully stacked chart.

You will ge the desired result.

check a simple pivot example https://www.youtube.com/watch?v=T8Ekr_sLP-0





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile
amitchandak
Super User
Super User

@Poongovil , please swap legend and axis column and check

Sorry it does not work.... Tried swapping the legend and axis column

Hi @Poongovil ,

 

I created a measure and used level as a legend.

 

Measure =
VAR COUNT_BY_LEVEL =
    CALCULATE (
        COUNT ( 'Table'[ID] ),
        ALLEXCEPT ( 'Table', 'Table'[ID type], 'Table'[level] )
    )
VAR COUNT_BY_TYPE =
    CALCULATE ( COUNT ( 'Table'[ID] ), ALLEXCEPT ( 'Table', 'Table'[ID type] ) )
RETURN
    DIVIDE ( COUNT_BY_LEVEL, COUNT_BY_TYPE )

 

V-lianl-msft_0-1597905548157.png

Sample .pbix

If the problem persists,could you share the sample pbix  or sample data?(Please mask any sensitive data before uploading.)

 

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

Thank you. That works!!!

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.