Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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.
Here is the original SQL code for the entered value (e.g., 100.0 in this case) as the filter if it helps.
Solved! Go to Solution.
Hi , @catpoisoncat
Yes, in my test .pbix file , when we enter 6 , it return this:
when we enter 8, it returns this:
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
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.
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:
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:
when we enter 8, it returns this:
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.
@catpoisoncat , You have to create a measure using numeric parameter
measure = countrows(filter(Table, Table[column]>= [what if parameter]))
@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.
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
24 | |
19 | |
14 | |
10 | |
7 |