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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
leerjones85
Frequent Visitor

Help with DAX Measure

Hi,

 

I have a table which has 4 columns

 

TitlePotentialFrequencyNearly
Example 1              410
Example 2         200
Example 3         411
Example 4100
etc....etc....etc....etc....

 

I want to be able to highlight any rows that have Potential = 4 as Yellow and if Frequency or Nearly = 1 then highlight Red.

 

I am getting stuck in creating a measure to do this, so that I can then use this measure as the rule in conditional formatting.

 

Any help is much appreciated.

 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@leerjones85 

Not sure if I I fully understand your question, try this and let me know:

CF = 
VAR __Case1 = CALCULATE( SUM(Table01[Value]) , Table01[Col] = "Potential") = 4
VAR __Case2 = CALCULATE( SUM(Table01[Value]) , Table01[Col] = "Frequency" )  = 1
VAR __Case3 = CALCULATE( SUM(Table01[Value]) , Table01[Col] ="Nearly" )  = 1
VAR __Result = 
    SWITCH(
        TRUE(),
        __Case1, "yellow",         
        OR(__Case2, __Case3 )  , "red"
    ) 
RETURN
    __Result

Fowmy_0-1731399185582.png

 



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

3 REPLIES 3
Fowmy
Super User
Super User

@leerjones85 

Not sure if I I fully understand your question, try this and let me know:

CF = 
VAR __Case1 = CALCULATE( SUM(Table01[Value]) , Table01[Col] = "Potential") = 4
VAR __Case2 = CALCULATE( SUM(Table01[Value]) , Table01[Col] = "Frequency" )  = 1
VAR __Case3 = CALCULATE( SUM(Table01[Value]) , Table01[Col] ="Nearly" )  = 1
VAR __Result = 
    SWITCH(
        TRUE(),
        __Case1, "yellow",         
        OR(__Case2, __Case3 )  , "red"
    ) 
RETURN
    __Result

Fowmy_0-1731399185582.png

 



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Thank You, this worked.

shafiz_p
Super User
Super User

Hi @leerjones85 
You can achieve this by using conditional formating in cell elements option. Just select the series name from drowdown and set rules for backgroud color. See image:

shafiz_p_0-1731397084492.png

 

 

 

 

Hope this helps!!

If this solved your problem, please accept it as a solution and a kudos!!

 

 

Best Regards,
Shahariar Hafiz

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.