cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
sonam7 Regular Visitor
Regular Visitor

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

Accepted Solutions
AClerk New Contributor
New Contributor

Re: Issue with Conditional Formatting

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

2 REPLIES 2
gckcmc Member
Member

Re: Issue with Conditional Formatting

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

AClerk New Contributor
New Contributor

Re: Issue with Conditional Formatting

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

Helpful resources

Announcements
Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 253 members 2,738 guests
Please welcome our newest community members: