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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Dynamic Calculated Value Based on Two Slicers

What I have:

 

PROJECTWORKERS
AAlan
A

Bary

ACoen
ADani
AEarl
BFord
BGail
BHerb
CIago
CJohn

 

What I need:

guinossauro_0-1663263958087.png

---

Making a "Project Comparison Tool"

 

Left side a dynamic Project chosen by Slicer A... Right side a dynamic Project chosen by Slicer B

 

Already got this to work...

But now I need a calculated card with a dynamic measure based on the values of the other cards.

(in the example, 4/5)

 

PowerBI doens't seems to be object oriented as other microsoft applications... so I can't just get "card01.value"

 

Already tried to use SELECTEDVALUE as a filter but it doesn't work...

 

any ideas?

 

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

Hi @Anonymous ,

According to your description, I'm afraid it can't be achieved in a single table, as Power BI can't distinguash the same column in two seperate slicers. Here's my solution.

1.In Power Query, right-click the table and select Duplicate to create a duplicate table. The two tables should have not relationship in data model.

vkalyjmsft_0-1663306073862.png

2.Create a measure.

Measure =
DIVIDE ( COUNT ( 'Table (2)'[WORKERS] ), COUNT ( 'Table'[WORKERS] ) )

3.Then put PROJECT columns from the two tables to seperate slicers, put WORKERS columns from two tables to seperate card visuals and select Count in the fileds pane, then put the measure in a card visual, get the result.

vkalyjmsft_1-1663307506938.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

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-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

According to your description, I'm afraid it can't be achieved in a single table, as Power BI can't distinguash the same column in two seperate slicers. Here's my solution.

1.In Power Query, right-click the table and select Duplicate to create a duplicate table. The two tables should have not relationship in data model.

vkalyjmsft_0-1663306073862.png

2.Create a measure.

Measure =
DIVIDE ( COUNT ( 'Table (2)'[WORKERS] ), COUNT ( 'Table'[WORKERS] ) )

3.Then put PROJECT columns from the two tables to seperate slicers, put WORKERS columns from two tables to seperate card visuals and select Count in the fileds pane, then put the measure in a card visual, get the result.

vkalyjmsft_1-1663307506938.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

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

 

Anonymous
Not applicable

Hi @v-yanjiang-msft 

 

Although this solution works, my IRL problem I have to do this division with several tables and they're quite large. I don't know if duplicating all the tables will result in a file with double the size and half the 'speed'.

 

Thanks anyways 😉

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.