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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Boni
Frequent Visitor

Dax Funktion to mark up Table line in color

Dear Community, 

is there any dax formular, witch I can Use to mark up the Lines in my table with colors. I specialy need a formular witch mark ups the line when three conditions are completed.
Example:

Boni_0-1629708811284.png

I whant to markt the line of "line Item A1" in green because both conditions are completed sucsesfull. 
It would be much better if there is a Slicer that can display if functions.
That means: when I tell the filter: please mark all lines with a CTR of 0.02% and over 100 impressions in green.

 

 Thanks for helping me out. 

Boni 

4 REPLIES 4
selimovd
Super User
Super User

Hey @Boni ,

 

that should be possible.

You can create 2 what-if parameter, one for the CTR and one for the impressions. The SELECTEDVALUE from these two slicers you can then use in a "formatting measure". You can check if [CTR] and [impressions] are above the selected values and if yes return green, otherwise red. This measure you can then use for all columns as background formatting.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 
Boni
Frequent Visitor

Hi Denis, 

I createtd now the two what if functions. But now I am lost again. 
I tried to build an Funktion: = IF ([CTR] <0.2, green, red),
                                                    Selectedvalue ('CTR what if parameter') 
is this the way you ment? 
would be aswome if you could have a quick view on this. 
Beste regards 

Boni 

Hey @Boni ,

 

more something like this:

Color Measure =
VAR vCTRParameter = SELECTEDVALUE( 'CTR what if parameter'[CTR Column] )
VAR vImpressionParameter = SELECTEDVALUE( 'Impression what if parameter'[Impression Column] )
RETURN
    IF(
        [CTR] < vCTRParameter && [Impressions] > vImpressionParameter,
        green,
        red
    )

 

Can you work with this? Otherwise I would be happy if you could share your file or create a demo file and I can implement the approach.

 
Best regards
Denis
 
PaulDBrown
Community Champion
Community Champion

any chance you can share a sample PBIX file through Onedrive, Dropbox, Google Drive...?





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.