IF statement based on percentage

djemy1975

Board Regular
Joined
Jan 18, 2016
Messages
51
Hi colleagues,

I want to write an if statement in a measure and display result in a card visual as follows:

If([Var YTD%] is greater than or equals 15% show "RCA" and format it in red font color otherwise "No RCA" and font in green color

my Var YTD% is a result of another measure: VAR YTD% = divide([VAR YTD];Budget[Bud YTD])

Any ideas are highly appreciated.

Best regards,
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
It's hard to give a concrete Excel answer because your question does not reference cells or data.

You need two things: A formula, and conditional formatting.

Let's say Var YTD% is in cell A1. Your formula (let's say it's in A2) will be

Excel Formula:
=IF(A1>=15%,"RCA","No RCA")

For the font color you need to use conditional formatting. Format this cell with red font. Then add this conditional formatting rule:

Excel Formula:
=A2="No RCA"

and apply green font formatting.
 
Upvote 0
It's hard to give a concrete Excel answer because your question does not reference cells or data.

You need two things: A formula, and conditional formatting.

Let's say Var YTD% is in cell A1. Your formula (let's say it's in A2) will be

Excel Formula:
=IF(A1>=15%,"RCA","No RCA")

For the font color you need to use conditional formatting. Format this cell with red font. Then add this conditional formatting rule:

Excel Formula:
=A2="No RCA"

and apply green font formatting.
This is a Power BI question not excel .In excel the formula is so easy to apply.

Thank you for your reply even though.

Regards,
 
Upvote 0
My apologies, I was looking at the Unanswered threads queue and neglected to notice it was PBI.
 
Upvote 0

Forum statistics

Threads
1,225,624
Messages
6,186,066
Members
453,336
Latest member
Excelnoob223

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top