March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
How could I show what multiple filters are selected on a report page?
There are date filters and categorical filters.
I want the label to show everything that currenlty selected at al times.. and "ALL" when everything is selected.
Solved! Go to Solution.
@Anonymous,
You may learn to use ISFILTERED Function inside the IF Function.
@roundwound @Anonymous
I would use a measure structured something like this:
Filters Selected = IF ( ISFILTERED ( MyTable[MyColumn] ), CONCATENATEX ( FILTERS ( MyTable[MyColumn] ), MyTable[MyColumn], ", " ), "ALL" )
The reason for using FILTERS is because it returns direct filters on the specified column, as opposed to VALUES which would return the values visible in a column incorporating cross-filtering from other columns.
@Anonymous,
You may learn to use ISFILTERED Function inside the IF Function.
Must have missed the actual solution somehow. No doubt this is great advice, but something a bit more detailed and specific might actually be helpful.
@roundwound @Anonymous
I would use a measure structured something like this:
Filters Selected = IF ( ISFILTERED ( MyTable[MyColumn] ), CONCATENATEX ( FILTERS ( MyTable[MyColumn] ), MyTable[MyColumn], ", " ), "ALL" )
The reason for using FILTERS is because it returns direct filters on the specified column, as opposed to VALUES which would return the values visible in a column incorporating cross-filtering from other columns.
How would you tweak this code if you wanted to add a second filter/slicer?
Thank you for sharing such an elegant solution.
Can you think of an equally elegant solution to incorporate an "All Except" rule? For example, I could have a filter with upto 30 different objects, and it could be I want to include all other than 2 of them. In this case it would be preferential to have the measure return "All Except AAA and BBB".
What do you think?
Something along these lines
Filters Selected (All Except version) = IF ( ISFILTERED ( MyTable[MyColumn] ), VAR ExcludedValues = EXCEPT ( ALL ( MyTable[Column] ), FILTERS ( MyTable[MyColumn] ) ) RETURN "All Except " & CONCATENATEX ( ExcludedValues, MyTable[MyColumn], ", " ), "ALL" )
This would return "All Except AAA, BBB, CCC,..." without an "and" between the last two items.
To include an "and" between the last two items would require a bit more logic: concatenating all but the last excluded item, followed by "and <last item>". Post back if you need help on that aspect.
Regards,
Owen
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |