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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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