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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
mheagerty
Frequent Visitor

DAX IF formula for 'numeric range paramater'

Hi, complete noobie here.

I have created a slider/visual using a 'numeric range paramater', where i can select/enter from the range provide (e.g. 1-100)

Im trying to create a new column for my table that uses an IF (less than, greater than) statement between the paramater value and another column in the table. Example:

Test = IF('Parameter'[Paramater Value] < 'Table'[Column],"True","False")

But this doesnt work, no matter what i select in the paramter as a value

If i dont use the paramater, it works fine

Test = IF('Table'[Column] < 0.6,"True","False")

Any help would be appreciated 🙂


1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @mheagerty 

 

The HotChilli advice is sound.

 

If you want 'Table'[Column] to output values based on the slicer's selection, you should use Measure, not Column.

 

And your slicer is a range, which is why your dax doesn't work.

 

You can extract values from the slicer, such as minimum values:

 

Create a measure.

 

Test = 
var _parameter = MIN('Parameter'[Parameter Value])
var _column = SELECTEDVALUE('Table'[Column])
RETURN 
IF(_parameter < _column, "True", "False")

 

Here is the result.

 

vnuocmsft_0-1725852097490.png

 

Regards,

Nono Chen

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

3 REPLIES 3
mheagerty
Frequent Visitor

@Anonymous @HotChilli  Thank you so much for providing this inofrmation, and in such detail.
This has worked perfectly, and I have also added a second parameter/variable for my measure 🙂




Anonymous
Not applicable

Hi @mheagerty 

 

The HotChilli advice is sound.

 

If you want 'Table'[Column] to output values based on the slicer's selection, you should use Measure, not Column.

 

And your slicer is a range, which is why your dax doesn't work.

 

You can extract values from the slicer, such as minimum values:

 

Create a measure.

 

Test = 
var _parameter = MIN('Parameter'[Parameter Value])
var _column = SELECTEDVALUE('Table'[Column])
RETURN 
IF(_parameter < _column, "True", "False")

 

Here is the result.

 

vnuocmsft_0-1725852097490.png

 

Regards,

Nono Chen

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

 

 

HotChilli
Super User
Super User

You can write a measure for this but you can't use a calculated column. They don't change in response to slicers.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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