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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to Append the UniChar Code Color to Power BI Column

Hello All,

 

  • I am having 2 Columns one is Status with Vlaues "Completed,InProgress,Blocked"
  • And other Calulcated Column(StatusColor) which tells about the status of the
    Status Column in the form of Color using below statement and it is working fine

 

SWITCH(TRUE(), 'Products'[Attribute] ="AM " && 'Products'[Value] = "Completed" ,UNICHAR("128994") , 'Products'[Attribute] ="AM " && 'Products'[Value] = "In-Progress" ,UNICHAR("128993") , 'Products'[Attribute] ="AM " && 'Products'[Value] = "Blocked" ,UNICHAR("128308")  )

 

But I would like to have append value of Status Column in Status Color Columns , So that Status Color Column holds the status and color of the status and tried below expression , But found no luck

 

AMR=Combine( SWITCH(TRUE(), 'Products'[Attribute] ="AM " && 'Products'[Value] = "Completed" ,UNICHAR("128994") , 'Products'[Attribute] ="AM " && 'Products'[Value] = "In-Progress" ,UNICHAR("128993") , 'Products'[Attribute] ="AM " && 'Products'[Value] = "Blocked" ,UNICHAR("128308")  ) , Products'[Value] )

Can any one please help me in knowing the issue in above expression

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , You can append value like

 

AMR= 'Products'[Value] & SWITCH(TRUE(), 'Products'[Attribute] ="AM " && 'Products'[Value] = "Completed" ,UNICHAR("128994") , 'Products'[Attribute] ="AM " && 'Products'[Value] = "In-Progress" ,UNICHAR("128993") , 'Products'[Attribute] ="AM " && 'Products'[Value] = "Blocked" ,UNICHAR("128308") )

 

or

 

AMR= SWITCH(TRUE(), 'Products'[Attribute] ="AM " && 'Products'[Value] = "Completed" ,UNICHAR("128994") , 'Products'[Attribute] ="AM " && 'Products'[Value] = "In-Progress" ,UNICHAR("128993") , 'Products'[Attribute] ="AM " && 'Products'[Value] = "Blocked" ,UNICHAR("128308") ) & 'Products'[Value]

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , You can append value like

 

AMR= 'Products'[Value] & SWITCH(TRUE(), 'Products'[Attribute] ="AM " && 'Products'[Value] = "Completed" ,UNICHAR("128994") , 'Products'[Attribute] ="AM " && 'Products'[Value] = "In-Progress" ,UNICHAR("128993") , 'Products'[Attribute] ="AM " && 'Products'[Value] = "Blocked" ,UNICHAR("128308") )

 

or

 

AMR= SWITCH(TRUE(), 'Products'[Attribute] ="AM " && 'Products'[Value] = "Completed" ,UNICHAR("128994") , 'Products'[Attribute] ="AM " && 'Products'[Value] = "In-Progress" ,UNICHAR("128993") , 'Products'[Attribute] ="AM " && 'Products'[Value] = "Blocked" ,UNICHAR("128308") ) & 'Products'[Value]

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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