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
MP-iCONN
Resolver I
Resolver I

What if parameter not working

I am trying to have a user input What If Parameter that will input a number into a measure and return a text value.

 

For example I created a What If Parameter from 0 to 20 and called it Days Allowed and added it as as slicer with a default value of 5.

 

In my Table then I created a column that will look to any values greater than "Days Allowed" and mark Late or On-Time.

 

Status = IF(DrilldownB_1[Days] > 'Days Allowed'[Days Allowed Value],"Late","On-Time")
 
For some reason the slicer when set to any number will not change the values in Status correctly.
 
In the screen shot below you can see that for Days Allowed I have it sliced at 8 but then in the Days column for 6 and 7 it is marking them as Late when it should have made it On-Time.
 MPiCONN_1-1640615434615.png
Thank you for any help on this.
 
Chad
 
1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, I think the STATUS is created as a column, right?

Instead of setting up the Status Column in the table as a calculated column, please try to create a calculated measure. And then, it will be dynamically change.

Thank you.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

5 REPLIES 5
oalgarvio
Frequent Visitor

I'm struggling with the same problem. How have you created a measure instead of a column? I'm getting the error "A single value for column 'A' in the table 'table1' cannot be determined (...)" 

Measure = IF( table1[A] >= parameter[parameter value],1,0)

I used a measure.

 

My What if Parameter is called Days Allowed with a range of 0 to 80 with a default value of 5.  Then my table is called DrilldownB_1.   My measure is called Status...

 

Status = IF(SUM(DrilldownB_1[Diff]) > 'Days Allowed'[Days Allowed Value],"Late","On-Time")

Ah, you are using a SUM. I believe that doesn't work for me. I really need to use a column. I created a post with my problem  feel free to comment if you have anything to add. Thank you

Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, I think the STATUS is created as a column, right?

Instead of setting up the Status Column in the table as a calculated column, please try to create a calculated measure. And then, it will be dynamically change.

Thank you.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Thank you!  For some reason I thought I needed to make that Status a calculated column but sure enough once I changed it to a measure that worked!  Thank you.

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.