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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
sonam7
Employee
Employee

Issue with Conditional Formatting

Hi,

I am trying to do conditional formatting on Text Field but I see that there is no direct approach to do that. Hence, I have come across a work around to achieve the same. Please find below the DAX code I have written for the color coding:

 

StateNumber =
VAR StateValue = SELECTEDVALUE('MASCI vwEnvironments'[State])
RETURN
SWITCH(TRUE(),
StateValue = "In Progress", 1
)
Conditional Formatting1.PNG
 
Basically, I am trying to color-code based on State. However, the conditional formatting doesn't work fine.
As you can see below, it skips some of the values which are in State: "In Progress" . Also, sometimes it introduces duplicates of rows but that goes away when I refresh.
 
Please help with the same!
Conditional Formatting.PNG
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @sonam7 

Check in the original dataset, if you have duplicates.

If there are duplicates, the formatting will not show.

You will have to get rid of the duplications. That can be achieved with adding a unique ID/Index to your visual, or deleting the duplicates in the import process.

 

Thanks!
A

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @sonam7 

Check in the original dataset, if you have duplicates.

If there are duplicates, the formatting will not show.

You will have to get rid of the duplications. That can be achieved with adding a unique ID/Index to your visual, or deleting the duplicates in the import process.

 

Thanks!
A

gckcmc
Resolver I
Resolver I

is it possible that in the rows that are being skipped over there is extra white space after "progress" like "In Progress "?

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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