Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have a report with a matrix visual like below where I'm showing scores for survey results. Each of the three columns in my matrix is a measure and I'm trying to add conditional formatting to the Delta column.
My conditional formatting is set up using a Field Value based on the measure [Color_Formatting]. The 25th percentile is -8.40, so anything below that should be formatted in red.
The issue is shown in the table visual on the left which has the Score Category (Process, Skills) and the Score Subcategory in the Rows pane. On this visual the conditional formatting is incorrect.
In the table visual on the right I removed the Score Category (Process, Skills) from the Rows Pane leaving only the Score Subcategory. In this visual, the conditional formatting is correct.
So the question is how I can correctly show the conditional formatting in the table on the left where I have Score Category (Process, Skills) and the Score Subcategory in the Rows pane.
Color_Formatting = IF(Delta <= [25Percentile], "Red","Black")
25Percentile = PERCENTILEX.INC(ALL('Table'[Scorecard_Subcategory]), 'Table'[Delta],.25)
Score for Opportunities Closed =
CALCULATE(
DIVIDE(SUM(Table[Scores]),COUNT(Table[Opportunity_ID])),
KEEPFILTERS(TABLE[Closed_Flag = 1))
Score for Opportunities Not Closed =
CALCULATE(
DIVIDE(SUM(Table[Scores]),COUNT(Table[Opportunity_ID])),
KEEPFILTERS(TABLE[Closed_Flag = 0))
Delta = [Score for Opportunities Not Closed] - [Score for Opportunities Closed]
Solved! Go to Solution.
@ERing then add both dimensions to the ALLSELECTED, review the results now, image attahced.
25Percentile = PERCENTILEX.INC(ALLSELECTED('Table'[Score Subcategory],'Table'[Score Category]),
'Table'[Delta],.25)
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!
@ERing Review the attached pbix file and screenshot.
Use All('Table') Instead of any specific column.
25Percentile = PERCENTILEX.INC(ALL('Table'), 'Table'[Delta],.25)
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
@fahadqadir3 Thanks for your suggestion, however it does not work with my real data.
Using just 'Table' in the ALL function produces the inccorect value for the 25th percentile.
I think the issue has something to do with row context of the conditional formatting.
The correct 25th percentile value is -36.91, so with my [Color Formatting] measure, anything below -36.91 should be red, but you can see it includes other values as well.
I've included a Sample File here if you would be able to take a look and make a reccomendation.
SAMPLE FILE
25Percentile = PERCENTILEX.INC(ALL('Table'[Score Subcategory]),'Table'[Delta],.25)
Color Formatting = if('Table'[Delta]<='Table'[25Percentile],"Coral","LightGray")
@ERing then add both dimensions to the ALLSELECTED, review the results now, image attahced.
25Percentile = PERCENTILEX.INC(ALLSELECTED('Table'[Score Subcategory],'Table'[Score Category]),
'Table'[Delta],.25)
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!
@fahadqadir3 Thanks very much! I think this works.
One small thing I noticed is that the 25th Percentile result is slightly different when calculated from my actual data table (Table) compared to when calculated from only the numbers present in the Matrix visual.
I wanted to test the accuracy of the 25PercentileCorrect measure so I created a Test table where I input the list of Delta numbers from the matrix visual. I then created the 25PercentileTest.
The 25PercentileCorrect = PERCENTILEX.INC(ALLSELECTED('Table' [Score Category], 'Table' [Score Subcategory]),'Table [Delta], .25) produces a result of -7.29.
The 25PercentileTest measure which is PERCENTILE.INC('Test'[Scores],.25). produces a result of -7.30.
I know it an insignificant difference, but I can't figure out what would cause the measures to produce a slightly different result.
Any ideas what would cause this?
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
68 | |
54 | |
53 | |
36 | |
34 |
User | Count |
---|---|
84 | |
71 | |
55 | |
45 | |
43 |