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

Conditional Formatting Based on Field

Hi,

 

So I am trying to color code my Card visualization based on a field, so that if the sum of this years data is less than last year for Initiated, the color is Green, else Red

or if the sum of this years data is less than last years data for Repaired, the color is Red, else Green.

I thought this worked, but the color seems to be the opposite of what I want the color to be as shown in the screenshots below... I am not sure why

The actual Card visualization with the measures seem to be correct...


Please let me know if this question is confusing

Thank you!

 

Measure = if([avg wr#count?]<[avg wr#count? last year],"Green","Red")
Measure 3 = if([Avg wr# count?]>[Avg wr# count?rep],"Green","Red")
 

capture.PNGCapturee.PNG

1 ACCEPTED SOLUTION

@Anonymous 

 

What is the visual you are using? Is it the KPI visual?

The default card visual works:

conditforma.JPG

 Conditform dialogue.JPG

 

If you are using the KPI visual, you need to set the colors in the formatting pane as follows:

KPIvis 1.JPG

 

Kpi vis 2.JPG

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

4 REPLIES 4
vivran22
Community Champion
Community Champion

@Anonymous 

 

What conditional formatting you have applied on the datacard?

 

Regards,

Vivek

PaulDBrown
Community Champion
Community Champion

@Anonymous 

 

Can you put the measures you are comparing in a table to see the results? I can't really tell what is happening from the card visual by itself...





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Anonymous
Not applicable

hi! @PaulDBrown 

So I added a table, for the Total Initiated Leaks This Week, I want the "avg wr#count?" to be less than "avg wr#count? last year" so if it is greater, I would want the 339 to be Red.

for the Total Repaired Leaks This Week, I want the "Avg wr#count?" to be Greater than "Avg wr#count?rep" so if it is Less, I would want the 52 to be Red.

 

It seems to be working in the "Green" and "Reg" measure and measure 3, but it is not working with the actual numbers....


Please let me know if this does not make sense

 

Thank you!
Sarah

 

capture.PNG

@Anonymous 

 

What is the visual you are using? Is it the KPI visual?

The default card visual works:

conditforma.JPG

 Conditform dialogue.JPG

 

If you are using the KPI visual, you need to set the colors in the formatting pane as follows:

KPIvis 1.JPG

 

Kpi vis 2.JPG

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






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.