Forum Discussion
Filter selection with "Select All"
Hi Team,
I have a report to be shown with the following
1. when user opens the report, the table visual should show empty or blank
2. when user selects the "Select All" from the filter, it should show all rows
3. when user selects particular item from the filter, it should show that particular item
The 2 and 3 are what i can currently achieve with the filter.
However, for the question 1 above, I tried to implement the empty card method with transparent and white color as suggested in this https://community.powerbi.com/t5/Desktop/Show-result-in-table-only-if-it-is-filtered/m-p/586917
However, this is not helping me when the user selects "Select All" from the filter, this card turns to white and hides the visual considering that there is no filter selection.
How to make it work when user "Select All", it should show all values
Hi Anonymous ,
"Select all" in filter pane and slicer doesnt have any filtering function,it just shows a result of all the selections selected.
I have a workaround for you:
Create a table as below:
Slicer table = UNION(VALUES('Table'[column1]),ROW("column1","Select all"))Then create a measure as below:
Measure = IF(ISFILTERED('Slicer table'[column1]), IF(SELECTEDVALUE('Slicer table'[column1])="Select all", CALCULATE(MAX('Table'[column1]),'Table'[column1] in VALUES('Table'[column1])), CALCULATE(MAX('Table'[column1]),'Table'[column1] in FILTERS('Slicer table'[column1]))))And you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
3 Replies
- amitchandakSuper User
Anonymous , In Power BI: select all / Nothing selected is same.
you can isfiltered to check if values is filtered or not
All measures should be like this
https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/
if(isfiltered(Table[Paratemeter]), [Measure], blank())
- AnonymousNot applicable
amitchandak Thanks Amit, I already have this measure in place like
Message = if(isfiltered(table[column]),"", "select a value")
Make Transparent = if(isfiltered(table[column]), "#FFFFFF00","White")
These measures are working as intended.
But my question is I need the user to see a blank table when he logs into the report and then click on "select all" from filter to see all rows or select indiviual item in the filter to view that particular item.
- v-kelly-msftCommunity Support
Hi Anonymous ,
"Select all" in filter pane and slicer doesnt have any filtering function,it just shows a result of all the selections selected.
I have a workaround for you:
Create a table as below:
Slicer table = UNION(VALUES('Table'[column1]),ROW("column1","Select all"))Then create a measure as below:
Measure = IF(ISFILTERED('Slicer table'[column1]), IF(SELECTEDVALUE('Slicer table'[column1])="Select all", CALCULATE(MAX('Table'[column1]),'Table'[column1] in VALUES('Table'[column1])), CALCULATE(MAX('Table'[column1]),'Table'[column1] in FILTERS('Slicer table'[column1]))))And you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!