Forum Discussion
Create a slicer based on a filtered measure
Hi golandriel
Thank you for these information.
To filter the POIs that have the exact number of bus stops in a specific distance range, you can first add a numeric range parmeter for No. of bus stops. When adding this parameter, select "Add slicer to this page". It will generate a measure for you like below, which is to get the selected value from the slicer.
Then you can create the following measure and add it to the table visual's filter pane. Set it to show items when value is 1.
Measure = IF(SUM('Table POI'[Count])=[No. of Bus Stops Value],1,0)
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Thank you Jing Anonymous ,
it worked!
The only problem is that the parameter slicer only works on my table visual and not on my data set in general. There are steps following where I need to keep that filter.
Another issue is that I can't set the parameter slicer to 0 to show me POIs that don't have any bus stops in a specific distance.
Do you think I can get these problems solved using Power BI?
Best regards,
Frederik
- Anonymous2 years agoNot applicable
Hi golandriel
Sorry for the late reply. I missed it earlier. For the second question, we can solve it by modifying our previous solution like below. Create a table to have all possible POI IDs in a column. Connect it to the original table on this POI ID column.
Then modify the measure like below (+0). This can turn blank to 0 when there is no bus stop, making it able to compare the sum result with the 0 selected from the slicer.
Measure = IF(SUM('Table POI'[Count])+0=[No. of Bus Stops Value],1,0)For the first question, do you hope to apply the filter to the overall report? If so, the current solution will not work as measures can only be applied to specific visuals as a filter. Measures cannot be used as a page/report level filter.
Best Regards,
Jing- golandriel2 years agoFrequent Visitor
Hi Anonymous,
thank you for your reply. I haven't solved my problem yet. The answer to my first question should work.
Regarding my first question: Yes, I was hoping that there is a solution to apply my filter on the whole report instead of just specific visuals because I want to apply other filters in followings steps. Maybe I have to think about another solution.
Thank you and best regards!