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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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