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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Praj
Helper I
Helper I

How to get individual values in clustered column chart

Hi Everyone,

 

I have been stuck with a problem where I need to identify the individual values of a column and stack that together in a column bar chart. 

 

For example, I have below survey Q&A data and I need to find the individual contributions of each country and then put that value in the bar chart.

Praj_0-1683192633369.png

The output above gives me the overall contributions of each countries, however if I select any individual country(for ex, if i select France, I get the below values where approx, 23% have choosen option 1, 25% have choosen option 2 and 3 and 13% have choosen option 4 and 5)

Praj_1-1683192728770.png

 

I am looking to have the above same values when I deselect France from the filter in comparasion with other countries. I know the value gets divided by overall respondents if i clear filteres but is there any way on how I can get individual values of each countries together.

 

I have attached the .pbix file for reference in the below shared link. Any solution/approach is highly appreciated. 

 

https://drive.google.com/drive/folders/1SoUdJDzWLtrFCvDhNmaB04LiXNMxCXyJ?usp=share_link

 

Cheers,

Praj

 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Praj 
Please refer to your sample file updated as requested.

3.png

CountQ123 = 
VAR Count1 = DISTINCTCOUNT ( 'Q1,Q2,Q3'[Index] )
VAR TotalCount = CALCULATE ( DISTINCTCOUNT ( 'Q1,Q2,Q3'[Index] ), ALLEXCEPT ( 'Q1,Q2,Q3', 'Q1,Q2,Q3'[Country] ) )
RETURN
    DIVIDE ( Count1, TotalCount )

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @Praj 
Please refer to your sample file updated as requested.

3.png

CountQ123 = 
VAR Count1 = DISTINCTCOUNT ( 'Q1,Q2,Q3'[Index] )
VAR TotalCount = CALCULATE ( DISTINCTCOUNT ( 'Q1,Q2,Q3'[Index] ), ALLEXCEPT ( 'Q1,Q2,Q3', 'Q1,Q2,Q3'[Country] ) )
RETURN
    DIVIDE ( Count1, TotalCount )

Hi @tamerj1 ,

 

Thanks for the approach. The solution worked.

 

Cheers,

Praj

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors