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

See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap

Reply
Anonymous
Not applicable

Workaround for Dynamic Column calculation based on Slicer Selection

I have a simple column of values and I want to use a calculated column to determine if those values PASS or FAIL. However, I want to be able to change the minimum pass value and maximum fail value by using a slicer. When I put fixed numbers in the formula, the column values are shown appropriately; but, it has to be changed by editing the formula if I want to raise or lower minimum and maximum pass/fail values. I want to be able to change it using a slicer. 

WORKING:

working.PNG

 

Not working:

Result = IF('t1'[Column1]>='Pass parameter'[Pass parameter Value],"PASS",IF('t1'[Column1]<='FAIL parameter'[FAIL parameter Value], "FAIL", "UNDETERMINED")) 

notworking.PNG

 

I read a lot that PowerBI isn't capable of dynamically caluculating a column. I realize that PowerBI might not be capable of doing EXACTLY what I want here, but there has to be some sort of workaround that allows me to change the column values with a slicer.

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

hi, @Anonymous 

First, you must know that calculated column and calculate table can't be affected by any slicer. 
Notice:
1. Calculation column/table not support dynamic changed based on filter or slicer.
2. measure can be affected by filter/slicer, so you can use it to get dynamic summary result.
here is reference:
https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/
Second, you could use a measure instead of it by this formula

Measure Result = IF(SUM(t1[Column1])>=[Pass parameter Value],"PASS",IF(SUM(t1[Column1])<=[FAIL parameter Value],"FAIL","UNDETERMINED"))

Result:

3.JPG4.JPG

By the way: You need to set Column1 is "Don't Summarize"

 

Best Regards,

Lin

 

 

 

Community Support Team _ Lin
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

1 REPLY 1
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

First, you must know that calculated column and calculate table can't be affected by any slicer. 
Notice:
1. Calculation column/table not support dynamic changed based on filter or slicer.
2. measure can be affected by filter/slicer, so you can use it to get dynamic summary result.
here is reference:
https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/
Second, you could use a measure instead of it by this formula

Measure Result = IF(SUM(t1[Column1])>=[Pass parameter Value],"PASS",IF(SUM(t1[Column1])<=[FAIL parameter Value],"FAIL","UNDETERMINED"))

Result:

3.JPG4.JPG

By the way: You need to set Column1 is "Don't Summarize"

 

Best Regards,

Lin

 

 

 

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

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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