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
jsfuhrman
New Member

1 measure, multiple lines & different colors on different lines?

Hi everyone - I'm working on a project to display some Power BI reports in a dashboard. This dashboard is then dislpayed through MVix in our office display (65" TV's set up at various locations thoughout the office). Normally tweaking colors of fonts would just be done via normal formatting, but with what I'm attempting it's all wrapped up in 1 measure to display multiple things.

the measure DAX looks like this:

Out_Display =
VAR ProjectNm = SELECTEDVALUE('Projects_List All'[Project Name])
Var Dt = SELECTEDVALUE('Projects_List All'[RTF Day Countdown])
Var DueDate = SELECTEDVALUE('Projects_List All'[RTF_Dt_Formatted])
Var CountdwnTyp = SELECTEDVALUE('Projects_List All'[Title - Condition Type Countdown])
Return
ProjectNm  & REPT(UNICHAR(10),2) &
Dt &  REPT(UNICHAR(10),1) &
CountdwnTyp &
REPT(UNICHAR(10),2) &
DueDate
 
with the intent to display
A Project name
<return space>
Countdown of days remaining
Type of countdown
<return space>
Due Date

like this (working)

jsfuhrman_0-1723474419132.png

I'd like all the font to be in white, with the exception of the Countdown of days remaining part of the measure to be in another color.

Is this possible? I've thought about constructing a conditional formatting measure, but i'm not sure if it will work for part of the measure and not all the measure.

1 ACCEPTED SOLUTION

@jsfuhrman Could probably be done as an SVG graphic. Probably could be done in Deneb as well. Or, maybe go with an HTML Content visual.



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

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

@jsfuhrman I don't believe that will work. I would create 2 measures, one for the countdown number and then the other one that you have. Overlay another card visual on top of the original one with a transparent background, put your counter in there and then color it the color you want.



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...

If the end result were to present in Power BI service, that would totally work. Unfortunately with MVix displays, it only works with a PBI Dashboard, so i've got to take a visualization, pin this to a dashboard, then connect that dashboard to an MVix media feed. its a cumbersome process. I might explore bagging MVix and just using a raspberry Pi as the display unit - as i think i'd have much more freedom for displaying things.

I did try passing a Custom Formatting measure and use this measure in the Conditional formatting... it works with 1 value passed, but not multiple values passed - which i suspected was the case, but thought i'd try. Mostly just posting in case these ideas help someone or provides some samples of things to try for their needs. I wonder if its possible to use DAX to pass some underlying json code or something. Just kindof thinking outloud.

This works:

CF =
VAR ProjectNm_Color = IF(SELECTEDVALUE('Projects_List All'[Project Name]) = "Country Acres", "#b3e0dc", "#000000")
Var Dt_Color = if(SELECTEDVALUE('Projects_List All'[RTF Day Countdown]) >= 10, "#ffffff", "#D0312D")
Var DueDate_Color = if(SELECTEDVALUE('Projects_List All'[RTF_Dt_Formatted]) > today(), "#b3e0dc", "#000000")
Var CountdwnTyp_Color = if(SELECTEDVALUE('Projects_List All'[Title - Condition Type Countdown]) = "RTF Countdown", "#b3e0dc", "#000000")
Return
Dt_Color



This Does not work:

CF =
VAR ProjectNm_Color = IF(SELECTEDVALUE('Projects_List All'[Project Name]) = "Country Acres", "#b3e0dc", "#000000")
Var Dt_Color = if(SELECTEDVALUE('Projects_List All'[RTF Day Countdown]) >= 10, "#ffffff", "#D0312D")
Var DueDate_Color = if(SELECTEDVALUE('Projects_List All'[RTF_Dt_Formatted]) > today(), "#b3e0dc", "#000000")
Var CountdwnTyp_Color = if(SELECTEDVALUE('Projects_List All'[Title - Condition Type Countdown]) = "RTF Countdown", "#b3e0dc", "#000000")
Return
ProjectNm_Color & REPT(UNICHAR(10),1) &
Dt_Color & REPT(UNICHAR(10),1) &
DueDate_Color & REPT(UNICHAR(10),1) &
CountdwnTyp_Color

@jsfuhrman Could probably be done as an SVG graphic. Probably could be done in Deneb as well. Or, maybe go with an HTML Content visual.



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