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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Conditional formating help

I have two measures - Net Sale and Target.

Both measures are in different tables.

If the Net Sale is below Target, I want to change the font color of Net sale.

Please help

2 ACCEPTED SOLUTIONS
mauriciosotero
Resolver III
Resolver III

Hi,

 

Create a new measure for que Color comparing the nets and targets, example:

 

ColorKPI = SWITCH(TRUE();SUM('Table'[Net])-SUM('Table'[Target])<0;"#FF0000";"#008000")


Then,

Use this measure in the conditional formatting, using the option Format By Field Value

View solution in original post

Anonymous
Not applicable

Target_NS_COMP = IF( [Net Sale] > [NS_Target] , "Green", "Red" )
Based on the column, we can do the conditional formating.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Target_NS_COMP = IF( [Net Sale] > [NS_Target] , "Green", "Red" )
Based on the column, we can do the conditional formating.
mauriciosotero
Resolver III
Resolver III

Hi,

 

Create a new measure for que Color comparing the nets and targets, example:

 

ColorKPI = SWITCH(TRUE();SUM('Table'[Net])-SUM('Table'[Target])<0;"#FF0000";"#008000")


Then,

Use this measure in the conditional formatting, using the option Format By Field Value

Anonymous
Not applicable

Bro, can you please explain in detail, both measures are in different tables.

My example used two columns in the same table, but you can do with measures in different table (if they have relations) was you shown above.

 

If my post helped you, I appreciate your Kudos.

Thanks

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.