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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
rama211976
Regular Visitor

Required to calculate percentage for Clustered Column Chart with Multiple filters

Hi All,

 

I need to calculate the percentage (not the GT) for the report with multiple filter conditions. I could able to resolve this when having only one filter. the main requirement is the filter conditions should be considered as 100% and do the calculation but my logic considering the GT and getting the percentage wrong...

 

 

I have columns like

 

State   Gender   age group  salary range marriage status

 

In this, I need to calculate the percentage in the clustered column chart using state and marriage status as x and y axis

 

Filers are State   Gender   age group  salary range

 

sample data shared below

 

GenderAge GroupStatusRegionSalary
Male15-24UnMarriedCity 1Lower I 
Female15-24UnMarriedCity 2Middle I 
Male15-24DivorceCity 1Lower I 
Male15-24UnMarriedCity 3Middle II 
Female15-24UnMarriedCity 2Lower I 
Female15-24MarriedCity 1Lower II 
Male15-24UnMarriedCity 3Lower I 
Female15-24UnMarriedCity 1Lower I 
Male15-24UnMarriedCity 1Lower I 
Female25-34UnMarriedCity 1Lower I 
Female25-34UnMarriedCity 1Lower II 
Male25-34UnMarriedCity 4Middle II 
Male25-34UnMarriedCity 4Middle II 
Female25-34UnMarriedCity 1Middle II 
Male25-34UnMarriedCity 4Lower I 
Female25-34UnMarriedCity 4Middle II 
Female25-34UnMarriedCity 1Middle I 
Male25-34UnMarriedCity 1Lower I 
Male25-34UnMarriedCity 1Middle II 
Female25-34UnMarriedCity 3Lower I 
Female25-34UnMarriedCity 1Lower I 
Female25-34MarriedCity 5Middle I 
Female25-34UnMarriedCity 1Upper II 
Male25-34UnMarriedCity 3Lower I 
Male25-34UnMarriedCity 5Lower I 
Male25-34UnMarriedCity 1Lower II 
Male25-34UnMarriedCity 1Middle II 
Male25-34UnMarriedCity 1Middle II 

 

4 REPLIES 4
v-yiruan-msft
Community Support
Community Support

Hi @rama211976 ,

I created a sample pbix file(see the attachment), please check if that is what you want. You can create a measure as below to get it:

 

Percentage = 
VAR _allrcount =
    CALCULATE (
        COUNT ( 'Table'[Status] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Region] = SELECTEDVALUE ( 'Table'[Region] ) )
    )
VAR _selcount =
    CALCULATE ( COUNT ( 'Table'[Status] ) )
RETURN
    DIVIDE ( _selcount, _allrcount )

 

yingyinr_0-1670465947587.png

If the above one can't help you get the desired result, please provide more raw 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. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

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

My requirement whenever we do filter automatically it needs to calculate 100%.. sharing the excel file for better understanding

 

https://drive.google.com/drive/u/0/folders/1EspAR9KFIjIArh7ZaPG7Pa0jDVGs699F 

Hi @rama211976 ,

It seems that I have no access to your shared file, could you please grant me the proper permission to it? And please provide the expected result with the specific examples and explanations. Thank you.

yingyinr_0-1670893972602.png

Best Regards

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

https://drive.google.com/drive/folders/1MBiTOPnkrzhhuvh1dq_vlI1m__QjncFO?usp=sharing 

 

I have shared the example with the graphs in the above mentioned link

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.