Forum Discussion
Anonymous
8 years agoNot applicable
Conditional formatting for a text column
Hi PBI community, Is there a way to change the background or font color of a table cell for a text based column using DAX. Any help would be appreciated. Thank you!
d_rohlfs
4 years agoResolver II
If you are looking to use DAX, here is an easy formula to use.
Title =
VAR Name1 = IF(SELECTEDVALUE('TABLE'[COLUMN]) = "TEXT", True, False)
VAR Name2 = IF(SELECTEDVALUE('TABLE'[COLUMN]) = "TEXT", True, False)
VAR Name3 = IF(SELECTEDVALUE('TABLE'[COLUMN]) = "TEXT", True, False)
RETURN
SWITCH(
TRUE(),
Name1 , "COLOR",
Name2, "COLOR",
Name3, "COLOR")
You would just need to type in the table names and columns. This method would require you to type in all of the cell contents that you want to format, but it works great for smaller distinct value distributions.