Forum Discussion
Dynamic filtering/slicing if text contains
- 7 years ago
Hi Gazza21,
I'm afraid the Search visual doesn't help in your scenario. Because it will filter out the unmatched records. Please download the demo in the attachment, which is the solution for your scenario.
1. Create an independent table of Assets.
Assets = FILTER ( VALUES ( Table1[Asset] ), ISBLANK ( [Asset] ) = FALSE () )
2. Create a measure.
Measure = VAR clients = CALCULATETABLE ( VALUES ( Table1[ClientNumber] ), ALL ( Table1[AD1], Table1[AD2], Table1[Asset] ) ) RETURN CALCULATE ( IF ( MIN ( Table1[ClientNumber] ) IN clients, 1, BLANK () ), ALLEXCEPT ( Table1, Table1[ClientNumber] ) )3. Create a Table visual and a Slicer.
Best Regards,
Dale
The equipment number is unique (its called Asset number in the image below).
hopefully this screenshot helps:
Hi Gazza21,
I'm afraid the Search visual doesn't help in your scenario. Because it will filter out the unmatched records. Please download the demo in the attachment, which is the solution for your scenario.
1. Create an independent table of Assets.
Assets = FILTER ( VALUES ( Table1[Asset] ), ISBLANK ( [Asset] ) = FALSE () )
2. Create a measure.
Measure =
VAR clients =
CALCULATETABLE (
VALUES ( Table1[ClientNumber] ),
ALL ( Table1[AD1], Table1[AD2], Table1[Asset] )
)
RETURN
CALCULATE (
IF ( MIN ( Table1[ClientNumber] ) IN clients, 1, BLANK () ),
ALLEXCEPT ( Table1, Table1[ClientNumber] )
)
3. Create a Table visual and a Slicer.
Best Regards,
Dale