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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Selva_Power_BI
Regular Visitor

Switch between two Text columns based on Slicer

Hi,
I have a tricky requirement for my dashboard to show values from two different text columns based on the slicer selection. I found so many close results for my search but everything I found is for Integer type columns like SUM(Column A) to return results by measure but my requirements is for Text column (Column for Comments)

 

So, if there is no selection in the Slicer, then I want to show the Text values from Column A and if there is any value selected in the slicer then I want to show the values from Column B. 

My basic Measure to get the result is SlicerCheck_Comments = IF (ISFILTERED('Table 1'[HUB]) = FALSE() , MAX('Table 1'[Comments A]), MAX(Table 1'[Comments B]))

This is not working becasue it returns only one row because of Max function, without Max function I am unable to add a column, please help me achieve this. 

If there is no selection like below then I want to see values from Comments A column

Selva_Power_BI_1-1610551653240.png

If there is any selection, I want to see values from Comments B column

Selva_Power_BI_2-1610551757640.png

Please help

 

 

 

1 REPLY 1

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.