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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
cristianml
Post Prodigy
Post Prodigy

Infographic Designer conditional Colors

Hi,

 

I want to custom the colors of the Infographic Designer values depending if the measure I use is negative or positive. 

 

cristianml_0-1648743614787.png

 

Is possible to write a dax code for this ? Also a way to be dynamic by colored depending of % of the values.

 

Thanks!

 

 

 

 

 

 

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @cristianml ,

 

Here I suggest you to add and use conditional formatting in your Infographic Designer custom visual.

For reference:

Support for conditional formatting for custom visuals

Add conditional formatting

According to your screenshot, I think you can try "Small multiples" funtion in Clustered column chart directly.

My Sample Table:

RicoZhou_0-1649059860004.png

DimDate:

 

DimDate = ADDCOLUMNS( CALENDARAUTO(),"Year",YEAR([Date]),"Qtr","Q"&""&QUARTER([Date]))

 

Create a relationship between [Date] columns in two tables.

Color Measure:

 

Color = 
IF(SUM('Table'[Sales])>0,"Blue","Red")

 

Use Field value and choose color measure in fx in Data color.

RicoZhou_2-1649059949272.png

Result is as below.

RicoZhou_1-1649059924458.png

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-rzhou-msft
Community Support
Community Support

Hi @cristianml ,

 

Here I suggest you to add and use conditional formatting in your Infographic Designer custom visual.

For reference:

Support for conditional formatting for custom visuals

Add conditional formatting

According to your screenshot, I think you can try "Small multiples" funtion in Clustered column chart directly.

My Sample Table:

RicoZhou_0-1649059860004.png

DimDate:

 

DimDate = ADDCOLUMNS( CALENDARAUTO(),"Year",YEAR([Date]),"Qtr","Q"&""&QUARTER([Date]))

 

Create a relationship between [Date] columns in two tables.

Color Measure:

 

Color = 
IF(SUM('Table'[Sales])>0,"Blue","Red")

 

Use Field value and choose color measure in fx in Data color.

RicoZhou_2-1649059949272.png

Result is as below.

RicoZhou_1-1649059924458.png

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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