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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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