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
AlenaSK
Regular Visitor

Problems with CALCULATE + ALLSELECTED in conditional formatting of the cell

Hi!

I'm trying to use a measure for conditional formatting for the cell of the table. 

The table consists of GeoHierarchy & LeadCategory as rows and KPIs as columns.

The filter dashboard is used for GEO hierarchy filters.

The logic is like this: the background of the cell for each rate should change color based on the value of the regional KPI.

I have 2 similar tables: for one the measure works, but for another - no.  I don't understand why.

 

The measure which works for background of 'Won Opportunity Rate':

Color WOR LPM = If([Won Oppty Rate]<Calculate([Won Oppty Rate], ALLSELECTED('All GEO hierarchy')), "#999999","#2BC275")
AlenaSK_0-1689848817774.png

So the filter is for AMER region, and each regional KPI is compared with the total value of 18%.


The second table is built with the same rows, but different KPIs as columns. But the measure doesn't work.

Here is the measure for 'Lead to Opp Conversion rate':

Color LTO = If([Lead to Oppty Conversion Rate]<Calculate([Lead to Oppty Conversion Rate], ALLSELECTED('All GEO hierarchy')), "#999999","#7f80ff")
AlenaSK_1-1689849585513.png

So here background should depend on total of 42%, but it is not responsive and is the same for all regions.

I don't know what can be the reason?



0 REPLIES 0

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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