Forum Discussion

hasharma19's avatar
hasharma19
Helper II
2 years ago

Conditional Formatting Help

Hello All,

Need a small help in applying conditional formatting.
I have table wherein status need to mentioned based on the marks and severity level(Table Name is DG).
Condition is

% calculation is   (Obtained marks/Total Marks)
If compliance >0.95% & Non-Complaince Level is 0 then "Compliant"

If compliance   >0.95% & severity =level 1 & Non-Complaince Level is >1 then "Non Compliant"
If compliance   >0.95% severity =level 2 & Non-Complaince Level is >=12 then "Partially Compliant"

if compliance <0.90% then "Non Compliant"


Below measure i have tried but not getting the required output. As whereever severity Level1 & Level2 number deducted it is reading only level2.

 

Rating = var per = IF('DG Audit Reports'[Rating%]>=0.95 &&[Non-Compl_Count]=0,"Compliant",

IF('DG Audit Reports'[Rating%]>=0.95 && [VAL]="Level1" &&[Non-Compl_Count]>=12,"Non Compliant",
IF('DG Audit Reports'[Rating%]>=0.95 && [VAL]="Level2" &&[Non-Compl_Count]>=12,"Partially Compliant",
IF([Rating%]<.90,"Non Compliant"))))
return
per

Val = IF(MEDIAN('DG Audit Reports'[Last Characters])=1,"Level1","Level2")

 

 

3 Replies

    • hasharma19's avatar
      hasharma19
      Helper II

      parry2k Apologies for the same.
      There are multiple measures i have used and there are too many columns, hence i have avoided to inculde.

      To get the % of score i have used below measure

      To get the Level1 & Level2, i have used below measure(Last characters is of first column of table"Severity"), as was not table to extract the text value.

      below is the logical measure i am trying to use to get the conditional formatting value

       

      TableName:-DG Audit Reports

      SeverityCompliance(Y, N, N/A)Compliant Level 1 =6Level 2 = 2Non-Compliant Level 1 = -12Level 2 = -2N/ALevel 1 = -6Level 2 = -2                                                    Site ReviewedReview DateCalRefNon_C_RefNN/AYearMonthLast CharactersFileNameH1_H2
      Level 2Y2  AMD VJR08-Jul-232   202372AMDVJR_H2_2023.xlsmH2
      Level 2Y2  AMD VJR08-Jul-232   202372AMDVJR_H2_2023.xlsmH2
      Level 2Y2  AMD VJR08-Jul-232   202372AMDVJR_H2_2023.xlsmH2
      Level 2Y2  AMD VJR08-Jul-232   202372AMDVJR_H2_2023.xlsmH2
      Level 2Y2  BLR HSR11-Jul-232   202372BLRHSR_H2_2023.xlsmH2
      Level 2Y2  BLR HSR11-Jul-232   202372BLRHSR_H2_2023.xlsmH2
      Level 2Y2  BLR HSR11-Jul-232   202372BLRHSR_H2_2023.xlsmH2
      Level 2Y2  BLR HSR11-Jul-232   202372BLRHSR_H2_2023.xlsmH2
      Level 2Y2  BLR MDY25-Jul-232   202372BLRMDY_H2_2023.xlsmH2
      Level 2Y2  BLR MDY25-Jul-232   202372BLRMDY_H2_2023.xlsmH2
      Level 2Y2  BLR MDY25-Jul-232   202372BLRMDY_H2_2023.xlsmH2
      Level 2Y2  BLR MDY25-Jul-232   202372BLRMDY_H2_2023.xlsmH2
      Level 2Y2  BLR MYQ15-Jul-232   202372BLRMYQ_H2_2023.xlsmH2
      Level 2Y2  BLR MYQ15-Jul-232   202372BLRMYQ_H2_2023.xlsmH2
      Level 2Y2  BLR MYQ15-Jul-232   202372BLRMYQ_H2_2023.xlsmH2
      Level 2Y2  BLR MYQ15-Jul-232   202372BLRMYQ_H2_2023.xlsmH2
      Level 2Y2  BLR YPU08-Jul-232   202372BLRYPU_H2_2023.xlsmH2
      Level 2Y2  BLR YPU08-Jul-232   202372BLRYPU_H2_2023.xlsmH2
      Level 2Y2  BLR YPU08-Jul-232   202372BLRYPU_H2_2023.xlsmH2
      Level 2Y2  BLR YPU08-Jul-232   202372BLRYPU_H2_2023.xlsmH2
      Level 2Y2  BOM BYO07-Jul-232   202372BOMBYO_H2_2023.xlsmH2
      Level 2Y2  BOM BYO07-Jul-232   202372BOMBYO_H2_2023.xlsmH2
      Level 2Y2  BOM BYO07-Jul-232   202372BOMBYO_H2_2023.xlsmH2
      Level 2Y2  BOM BYO07-Jul-232   202372BOMBYO_H2_2023.xlsmH2
      Level 2Y2  BOM GG108-Jul-232   202372BOMGG1_H2_2023.xlsmH2
      Level 2Y2  BOM GG108-Jul-232   202372BOMGG1_H2_2023.xlsmH2
      Level 2Y2  BOM GG108-Jul-232   202372BOMGG1_H2_2023.xlsmH2

       

      If post allows me to attached file, then i would have did that.
      Thanks

    • hasharma19's avatar
      hasharma19
      Helper II

      parry2k _Thanks for the guidece and apologies for the same.

      Below is the table i am using(table nale:-DG Audit Report)

      Val measure is used to extract the Level1 & Level2 type from last character(which is from first column last digit of table). I was not able to value from Severity Column itself which i can use in directly hence this measure i have applied.)

      To get the score have used below measure

      Trying to apply Conditional formatting based on avobe measure but not able to get the desire result.

      Required result is
      If rating >0.95% and Non-comp count=0 then "Complaint"
      if rating >0.95% and Val=Level1(which actually is Severity level available in first column of table) and Non Comp Count =>1 then "Non-Complaint"
      if rating >0.95% and Val=Level2 and Non Comp Count =>12 then "Partial-Complaint" 
      if rating <0.90% Non-Complaint"