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
Crazydog
Frequent Visitor

Slicer & value pick

So I have say 3 columns, 

 

(num)Col A     (num)Col B       (num)Col C (Calculated) 

0.5                   2(variable)           0.5 * 2 

 

7                      5                          7 * 5  

 

5                      4                           5*4 

 

 

I want to pick a value for Col B using Slicer (variable value), and Col C should automatically the col B value accross the board! meaning entrie col C will use Col B variable value. Any idea how can I do this ? 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Crazydog ,

 

1. This is not possible if columns [Col B] and [Col C] are calculated columns. Since the nature of a calculated column is that it is only recomputed when memory is flushed, it does not interact with the slicer once the computation is complete.

2. If they are measures, please try:

 

Measure = 
VAR _col_a = MAX('Table'[Col A])
VAR _value = SELECTEDVALUE('Table2'[Col B])
VAR _result = IF(_col_a = 0.5 , _value , MAX('Table'[Col B]))
RETURN
_result
Measure 2 = MAX('Table'[Col A])*[Measure]

 

vcgaomsft_0-1663639430216.png

vcgaomsft_1-1663639458522.png
Attached PBIX file for reference.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Crazydog ,

 

1. This is not possible if columns [Col B] and [Col C] are calculated columns. Since the nature of a calculated column is that it is only recomputed when memory is flushed, it does not interact with the slicer once the computation is complete.

2. If they are measures, please try:

 

Measure = 
VAR _col_a = MAX('Table'[Col A])
VAR _value = SELECTEDVALUE('Table2'[Col B])
VAR _result = IF(_col_a = 0.5 , _value , MAX('Table'[Col B]))
RETURN
_result
Measure 2 = MAX('Table'[Col A])*[Measure]

 

vcgaomsft_0-1663639430216.png

vcgaomsft_1-1663639458522.png
Attached PBIX file for reference.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

Thanks for this ! Is there any way I can input col B ? and col c will perform calc for that value... cos I am going have over 1000 values for col B.

amitchandak
Super User
Super User

@Crazydog , Based on what I got . Assume you have independent table with list of columns -ColumnList

 

You need a new measure

 

Sumx(Table, Switch(selectedvalues(ColumnList[Column List])

"Column2", [Column2] *[Column3],

"Column4", [Column2] *[Column3],

[Column2] *[Column3]) )

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
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.