Forum Discussion
Do not show data in Table and Multi-Row Card when Text Filter is empty
- 8 years ago
1. Create a measure
MeasureToCheck = COUNTROWS(ALLSELECTED(Sheet1[AnimalType]))
2. Select table visual first and then click and drag that measure to visual level filter (see pic below)
and choose is 1.
3. Repeat 2 but first click row card.
So we have
then
and at the end
Are you ok???
Are you ok with this???
Text Filter is using the Field: AnimalType
Multi-row Card is has the filter: AnimalType (All)
And when I type in the Text Filter, it does filter the Multi-Row Card as expected, so that works fine, its just getting it to show nothing in Multi-row Card when the Text Filter is blank, im looking into that link now, just seems confusing to me until I learn and understand DAX and how to access it in Power BI
Can you provide us with sample data???
- CookieMonster8 years ago
Helper I
Unfortuently not, I could put some sample data together in excel as the source and alter my BI report to use that until I work out how to do this?
I have tried creating a new measure, which I set the DAX to 'Measure = SELECTEDVALUE ( T1[AnaimalType] )', and applied it as a filter to the Multi-row Card, but this hasnt achieved what im after, im guessing im using it wrong.
- CookieMonster8 years ago
Helper I
Im wondering if your understanding my question, SELECTEDVALUE looks to be to put in a default value if a cell is blank, otherwise use the cell value.
But this is not what im after, can you confirm if my orgional question makes sense?
- sokg8 years ago
Solution Supplier
Unfortuently not, I could put some sample data together in excel as the source and alter my BI report to use that until I work out how to do this?
Yes do that.
and create this measure and put it in your row card not in visual level filter
Measure = SELECTEDVALUE ( T1[AnaimalType] ; <your measure here to show if one animal type is selected>)
- CookieMonster8 years ago
Helper I
Examples can be downloaded from:
RawData Excel Sheet > https://drive.google.com/open?id=1t99ftzHDmf2DFU8eHIg6laL8UGDxUlyr
Power BI Report > https://drive.google.com/open?id=10WiaUl5iwxFD_cdGtrf0WMNrCLeLHScU
So...
In the Text Filter, if you type in Dog, only Dog's should show in table and multi-row card
In the Text Filter, if you type in Cat, only Cat's should show in table and multi-row card
If Text Filter is empty, then table and multi-row card should not show any data.