cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Sort a TEXT field

Hi ,

 

Hi,

 

I have a DAX as below where if the field is "Red OR Amber" then I show the value else its blank.

Column = IF(Table1[Health] IN {"Red","Amber"} ,Table1[Values],"")
 
The challenge is that if I use this - I cannot sort as the column has to be modeled as Text.
Sorting by Table1[Values] is showing error.
How can I fix this?
 
Need Help!
Thanks
 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous 

Use blank()

Column = IF(Table1[Health] IN {"Red","Amber"} ,Table1[Values],blank())

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous 

Use blank()

Column = IF(Table1[Health] IN {"Red","Amber"} ,Table1[Values],blank())

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors