Forum Discussion
Show Filtered Value
I use the below statement to return a filtered value. I do it to highlight the value as a header for the visualization. My question is, how do I change the statement below So that if someone choose 2 selections from the filter, both values show up. Example, if I choose "Device 1" then Device 1 shows. But what if I filter for Device 1 and Device 2, "All Products" will show. TIA
IF(
Hi josevaras ,
Create a measure as below:
Measure = var _count=CALCULATE(DISTINCTCOUNT('Table'[Column1]),ALLSELECTED('Table'[Column1])) Return IF(NOT(ISFILTERED('Table'[Column1])),BLANK(), IF(_count=1,MAX('Table'[Column1]), CONCATENATEX(VALUES('Table'[Column1]),'Table'[Column1]," and ")))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!
5 Replies
- PaulDBrownCommunity Champion
Just to clarify, do you want to see the filtered individual values listed?
OR
If one value is filtered, show that value; if mora than one value is filtered, return "All Values"?
- josevarasMicrosoft Employee
I would like to see all selected values that have been filtered.
If i filter for Device 1 and Device 2, I would like to see Device 1 and Device 2.
I hope that makes sense. Thanks
- v-kelly-msftCommunity Support
Hi josevaras ,
Create a measure as below:
Measure = var _count=CALCULATE(DISTINCTCOUNT('Table'[Column1]),ALLSELECTED('Table'[Column1])) Return IF(NOT(ISFILTERED('Table'[Column1])),BLANK(), IF(_count=1,MAX('Table'[Column1]), CONCATENATEX(VALUES('Table'[Column1]),'Table'[Column1]," and ")))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!
- PaulDBrownCommunity Champion
Try:
filtered values =
IF(ISFILTERED(ProductDescriptionsTBL'[Product Specific Name] ),COCATENATEX(VALUES(ProductDescriptionsTBL'[Product Specific Name] ), ProductDescriptionsTBL'[Product Specific Name] , ", "),
"All Values")