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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
IPGeorgiev
Helper III
Helper III

Measure based on Column

Hi,

 

I have the following issue:

 

I have  a matrix which looks like this:

 

image.png

 

So the types here are the types of communication - Written or Voice.

 

So I will have a KPI1% under the two availible columns "Written" and "Voice"

 

I want to add coniditional formatting for KPI1% based on the targets that I have - however! the targets are different for the different communication types. So I cant have both as applying the targets for written for example will mean that the same conditional formatting will be added under "Voice" column as well.

 

1. Is it possible to have different conditional formatting based on the column value?

 

2. I guess 1) is not possible therefore I have tried to use quick measures.

 

I click right button KPI1% and select quick measure then I add a filter to be , for example, type="Written". This adds a new measure KPI1% for Written - this works as expected, HOWEVER I know have this value "KPI1% for Written" two times - under column "Written" and under Column "Voice" - is it possible to have this ONLY under the "Written" column?

 

Many thanks in advance!


Best regards,
Ivan

1 ACCEPTED SOLUTION

Right, so thinking of a measure like:

Measure?
VAR __Type to MAX('Table'[Type])
VAR __RedThreshold - IF(__Type to "Written",.75,.85)
VAR __KPI1 [KPI1%]
Return
IF(__KPI1 <-__RedThreshold,"Red","Green")


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

5 REPLIES 5
Greg_Deckler
Community Champion
Community Champion

You *should* be able to create a new measure that does the coding based upon the Type. You would then use this new measure for your rules. But, impossible to be specific because there are large gaps in required information like what are the rules that you are trying to implement for the color coding?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler ,

 

many thanks for the response!

 

Here  more information:

 

KPI1% is between 0% and 100%.

 

If the type is Written:

 

Values between 0% and 75% should be colored (background) in red.

Values between 75.01% and 100% should have green background 

 

If the type is Voice:

 

Values between 0% and 85% should be colored (background) in red.

Values between 85.01% and 100% should have green background 

 

Many thanks in advance!!

Right, so thinking of a measure like:

Measure?
VAR __Type to MAX('Table'[Type])
VAR __RedThreshold - IF(__Type to "Written",.75,.85)
VAR __KPI1 [KPI1%]
Return
IF(__KPI1 <-__RedThreshold,"Red","Green")


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler ,

you are just awesome!!

Thank you very much - it works!

Do you have an idea of what it would look like (the formula) if you have 3 channels - Voice, Written, Chat?

Awesome! Glad it works!! 🙂


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors