Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
category | total |
A | 345 |
B | 544 |
C | 743 |
D | 942 |
E | 1141 |
F | 1340 |
G | 1539 |
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.
on the above scenorio my answer should get 37%.
Please guide me this how to get.
Thanks
Solved! Go to Solution.
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:
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.
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:
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.
@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