Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
josevaras
Microsoft Employee
Microsoft Employee

Show Filtered Value

Hello everyone,

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(
HASONEVALUE( 'ProductDescriptionsTBL'[Product Specific Name] ),
VALUES( 'ProductDescriptionsTBL'[Product Specific Name] ),
if(
ISFILTERED( 'ProductDescriptionsTBL'[Product Specific Name] ),
"Name",
"All Products"
)
)
1 ACCEPTED SOLUTION

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:

 

Screenshot 2020-11-19 171744.pngScreenshot 2020-11-19 171757.png

Screenshot 2020-11-19 171811.png

Screenshot 2020-11-19 171822.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

View solution in original post

5 REPLIES 5
PaulDBrown
Community Champion
Community Champion

@josevaras  

Try:

filtered values =
IF(ISFILTERED(ProductDescriptionsTBL'[Product Specific Name] ),

COCATENATEX(VALUES(ProductDescriptionsTBL'[Product Specific Name] ), ProductDescriptionsTBL'[Product Specific Name] , ", "),

"All Values")





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






PaulDBrown
Community Champion
Community Champion

@josevaras 

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"?





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






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

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:

 

Screenshot 2020-11-19 171744.pngScreenshot 2020-11-19 171757.png

Screenshot 2020-11-19 171811.png

Screenshot 2020-11-19 171822.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

Thank you very much

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors