March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello Community,
I have column chart and table in one report page. Is there a possibilty to display the colour coding in the table based on colour of that text value in other visual?
Thank you in advance:)
Solved! Go to Solution.
Hi @HPS1RT
Yes , it is possible. If you want to have control over specific colors over bars you can add new dimension to your table that will map category with color.
Then you can use conditional formatting in Matrix/Table or Column Char that will format colors based on Field Value based on Column including Hexidecimal/Color name.
See the example below:
Hope it helps!
Hi @HPS1RT
You can create Dax with color coding and use a created measure for all the visuals.
For example :
or for graph :
pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi @HPS1RT
No, this can work only with Dax we don't have the functionality of coloring visuals based on other visuals, so you have to have some logic to get the colors.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi @HPS1RT
You can add new calculated column to your dim (categories) and use this syntax:
RandomColor =
VAR cR =
RANDBETWEEN (0, 255 )
VAR cG =
RANDBETWEEN (0, 255 )
VAR cB =
RANDBETWEEN ( 0, 255 )
VAR RedP0 =
MOD ( cR, 16 )
VAR RedP1 =
MOD ( INT ( cR / 16 ), 16 )
VAR GreenP0 =
MOD ( cG, 16 )
VAR GreenP1 =
MOD ( INT ( cG / 16 ), 16 )
VAR BlueP0 =
MOD ( cB, 16 )
VAR BlueP1 =
MOD ( INT ( cB / 16 ), 16 )
VAR hexTable =
ADDCOLUMNS (
{ RedP1, RedP0, GreenP1, GreenP0, BlueP1, BlueP0 },
"Hex", SWITCH (
[Value],
10, "A",
11, "B",
12, "C",
13, "D",
14, "E",
15, "F",
[Value]
)
)
RETURN
"#" & CONCATENATEX ( hexTable, [Hex], "" )
Something similar was presented here:
Solved: Create calculated column in DAX for random hex col... - Microsoft Fabric Community
Hope it helps!
Hello @StrategicSavvy
Thats wonderful. Thank you for your answer.
Actually if I use the stacked column chart, then I don't have option for conditional formatting. Any idea how to tackle this?
I think currenly there is no option to dynamically adjust color for legend in stacked bar chart. Here is similar problem:
Solved: Changing colours of legends - Microsoft Fabric Community
I would suggest to use only bar and slice by month (not ideal but synced)
Add your vote to this idea: Microsoft Idea which is about adding this functionality.
All the best!
Hi @HPS1RT
You can create Dax with color coding and use a created measure for all the visuals.
For example :
or for graph :
pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi @HPS1RT
Yes , it is possible. If you want to have control over specific colors over bars you can add new dimension to your table that will map category with color.
Then you can use conditional formatting in Matrix/Table or Column Char that will format colors based on Field Value based on Column including Hexidecimal/Color name.
See the example below:
Hope it helps!
Hello @StrategicSavvy , @Ritaf1983
Thank you for your reply.
Sorry I forgot to mention. I have "n" number of categories and I cannot define the colors to each of it.
can we make it something more dynamic such that categories in the table takes the color based on category color in column chart?
Thank you:)
Hi @HPS1RT
No, this can work only with Dax we don't have the functionality of coloring visuals based on other visuals, so you have to have some logic to get the colors.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
143 | |
97 | |
79 | |
68 |