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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
catpoisoncat
Frequent Visitor

Filter Out Columns by an Input Value in a Slicer

Screenshot 2022-12-14 160017.png

Hi guys,

 

I am very new to Power BI, and came across this situation.

 

I am generating a report based on a few filters, one of the filters enables users to input a value (interger or whole number) to filter out values that in these three columns. For example, if the user enters 5, none of the rows will be displayed, because they are smaller than 5. I am just thinking about using DAX to write a measure to achieve this, or maybe there is an easier way to do this as well. Can I please have some help? Thank you guys in advanced.

 

Screenshot 2022-12-14 161756.png

 

Here is the original SQL code for the entered value (e.g., 100.0 in this case) as the filter if it helps.

1 ACCEPTED SOLUTION

Hi , @catpoisoncat 

Yes, in my test .pbix file , when we enter 6 , it return this:

vyueyunzhmsft_0-1671092598927.png

when we enter 8, it returns this:

vyueyunzhmsft_1-1671092613868.png

 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

6 REPLIES 6
v-yueyunzh-msft
Community Support
Community Support

Hi, @catpoisoncat 

According to your description, you want to "Filter Out Columns by an Input Value in a Slicer". Right?

Here are the steps you can refer to , you can add a "what-if" parameter as a slicer , you can configure the value you want to filter.

vyueyunzhmsft_1-1671075213264.png

Then we can create a measure :

Flag = var _slicer =[Parameter Value]
return
IF(_slicer=BLANK(),1, IF(MAX('Table'[Column1])>=_slicer && MAX('Table'[Column2])>=_slicer ,1,0))

We can configure the measure on the "Filter on this visual", like this:

vyueyunzhmsft_2-1671075386341.png

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

Hi @v-yueyunzh-msft ,

 

Thank you so much for your reply, but I guess I did not describe my scenario very clearly. Let me try to explain again. Let's use your table this time.

 

Background: I am importing data from SQL server to Power BI, and creating report on Power BI desktop, then later on this report will be published on Power BI server which enables the users to check the report using the built-in filter.

 

Current: I need to add a filter onto canvas to eventually let users to enter a value, and then this value will be applied to the assigned 2 columns in this case, to filter out cell value that larger than this entered value. For example, if the user enters 8, only row f will be displayed in the report. So the condition is if any value in the row is greater or equal to the entered value, then the whole row will be displayed. So if the user enters enter 6, then row c and f will be displayed.

 

So, hope that helps you understand what I want to achieve. 

 

Thank you and looking forward to seeing your reply.

Hi , @catpoisoncat 

Yes, in my test .pbix file , when we enter 6 , it return this:

vyueyunzhmsft_0-1671092598927.png

when we enter 8, it returns this:

vyueyunzhmsft_1-1671092613868.png

 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

 

@v-yueyunzh-msft thank you so much for your help, I'll try to apply it when I get to work tomorrow.

amitchandak
Super User
Super User

@catpoisoncat , You have to create a measure using numeric parameter

 

measure = countrows(filter(Table, Table[column]>= [what if parameter]))

 

https://docs.microsoft.com/en-us/power-bi/desktop-what-if

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

@amitchandak  thanks for getting back to me.

 

but I don't need to count the rows, I need to display all the rows that satisfy the conditions that I wanted.

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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