cancel
Showing results for
Did you mean:

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Helper I

## Urgent - Dax - Return a switch value if cell 1 is greater than a percentage of cell 2

Need to finish this report off asap and hoping it is really simple for someone to explain to me.

Can someone help walk me through ensuring the Current Cell is formatted red if it equals greater than 80% of the number in the Limit cell.

Kind of like if [Current] = >*.8 of [Limit] than colour the cell Red

 Current Limit 103761.01 171818.18

I dont know if its possible and just thinking out loud, but am i supposed to create a new measure variable switch so if Current is greater then 80% of Limit then return a number 1. Then i can create a conditional formatting rule on the Current Column for any cell in this new measure is 1 then it will colour it red.

Many thanks for any responses.

1 ACCEPTED SOLUTION
Community Support

Hi @Cornwalls ,

Sorry for the delay.

Try following the steps.

1# Create a measure like:

``Measure = IF(SELECTEDVALUE('Table'[Current])>=0.8*SELECTEDVALUE('Table'[Limit]),1,0)``

2# Create conditional formatting on Current column.

The result should be as below.

Best Regards,

Jay

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
2 REPLIES 2
Community Support

Hi @Cornwalls ,

Sorry for the delay.

Try following the steps.

1# Create a measure like:

``Measure = IF(SELECTEDVALUE('Table'[Current])>=0.8*SELECTEDVALUE('Table'[Limit]),1,0)``

2# Create conditional formatting on Current column.

The result should be as below.

Best Regards,

Jay

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
Helper I

Thanks Mate, this worked perfectly. 👍