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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
hasharma19
Helper II
Helper II

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")

 

hasharma19_0-1698694214192.png

 

3 REPLIES 3
parry2k
Super User
Super User

@hasharma19 what are measures and what are the columns? It is hard to understand your post. Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k _Thanks for the guidece and apologies for the same.

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

hasharma19_1-1698742238269.png

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.)

hasharma19_2-1698742455823.png

To get the score have used below measure

hasharma19_3-1698742577383.png

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

hasharma19_4-1698742721565.png

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"

 

@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

hasharma19_2-1698739964510.png

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.

hasharma19_3-1698740463882.png

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

hasharma19_4-1698740685319.png

 

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

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.