Color coded based on conditions

Hi @amruthdna2018

You can use the below DAX code to create a measure which will be used to conditional formatting . You can change your condition per your requirement.

ColorcodeValue = 
SWITCH( 
    TRUE(),
    SELECTEDVALUE( 'Table'[CurrentQty]) <=SELECTEDVALUE('Table'[Safesideqty]), -1,
    SELECTEDVALUE('Table'[CurrentQty]) >SELECTEDVALUE('Table'[Safesideqty]) && SELECTEDVALUE('Table'[CurrentQty]) < SELECTEDVALUE('Table'[Minlot] ),1
) 

Steps to format:-

  1. Select the table and goto Format.
  2. Select “Conditional Formatting”
  3. Select "Status from the drop down( the column on which you want to do formatting)
  4. Turn On the Background Color
  5. Click on “Advanced Controls”

image

  1. Have the below setup and click ok.

The output.

Hope this helps you.

Thanks
Mukesh

1 Like