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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Ngauti
Frequent Visitor

How to divide the total within same category having two slicers of that same category

categorytotal
A345
B544
C743
D942
E1141
F1340
G1539

 

How to divide the total within same category having two slicers of that same category?
for example
Im adding the the two slicers for the category & on the third visual will be the card( logic should like if i select A on 1st slicer & i will select B on slicer 2 the in the card should show A of total sum divided by B of total sum.

Ngauti_0-1669393535981.png

on the above scenorio my answer should get 37%.

Please guide me this how to get.

Thanks

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi, @Ngauti 

Please try formula like:

Seperate calculated tables:

Slicer1 = VALUES('Table'[category])
Slicer2 = VALUES('Table'[category])

Measure:

Percenatge =
VAR value1 =
    CALCULATE (
        SUM ( 'Table'[total] ),
        FILTER ( 'Table', 'Table'[category] IN VALUES ( Slicer1[category1] ) )
    )
VAR value2 =
    CALCULATE (
        SUM ( 'Table'[total] ),
        FILTER ( 'Table', 'Table'[category] IN VALUES ( Slicer2[category2] ) )
    )
RETURN
    value1 / value2

Result:

veasonfmsft_0-1670295329341.png

Best Regards,
Community Support Team _ Eason
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

2 REPLIES 2
v-easonf-msft
Community Support
Community Support

Hi, @Ngauti 

Please try formula like:

Seperate calculated tables:

Slicer1 = VALUES('Table'[category])
Slicer2 = VALUES('Table'[category])

Measure:

Percenatge =
VAR value1 =
    CALCULATE (
        SUM ( 'Table'[total] ),
        FILTER ( 'Table', 'Table'[category] IN VALUES ( Slicer1[category1] ) )
    )
VAR value2 =
    CALCULATE (
        SUM ( 'Table'[total] ),
        FILTER ( 'Table', 'Table'[category] IN VALUES ( Slicer2[category2] ) )
    )
RETURN
    value1 / value2

Result:

veasonfmsft_0-1670295329341.png

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

amitchandak
Super User
Super User

@Ngauti , I think you need what I showed in this video

Compare Categorical Data Using Slicers - Compare two Brands: https://youtu.be/exN4nTewgbc

 

you need one slicer on independent table

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors