Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I have come across a situation where I need to manually assign color to my measures by creating Master items.
I have around 30+ variable calculations created in the script and each one requires different color. for time being I m creating a master measure for all the variables and assigning a color over there.
Is there any way to simplify this ? where we can specify all the variable names and assign some colors in the script or extension itself before we use them to create visualization.? So that wherever we use that specific variable same color should be carried out to the entire dashboard.
Can Someone help me please?
Regards,
Venamma
Hi @Venamma23
There was topic yesterday with this solution posted with an example, Would it help you? example
Hope this helps,
Hi,
Master measures can be created within the sheet. But I'm looking for something which can be defined at script level or may be if we have any extensions for the same.
Regards,
Venamma
Yes, you can assign colors to variables in the script like this:
Let vRed = Red();
Let vGreen = Green();
Let vBlue = Blue();
Let vRedRGB = ARGB(255, 255, 26, 26);
Let vGreenRGB = Argb(255, 0, 102, 0);
Let vBlueRGB = Argb(255, 26, 26, 255);
Let vRedRGBLight = ARGB(128, 255, 26, 26);
Let vGreenRGBLight = Argb(128, 0, 102, 0);
Let vBlueRGBLight = Argb(128, 26, 26, 255);
and consume them at the UI with this results:
Using the facilities to color dimensions or measures
Regards
You mentioned variables but this example might help:
Sometimes I need to assign color to my dimensions, so I just create a table with a column for color. Example:
Dimension | ColorABC |
Tomato | rgb(207, 35, 35) |
Orange | rgb(207, 107, 35) |
Avocado | rgb(49, 207, 35) |
Banana | rgb(207, 207, 41) |
Then I link the dimension with my main table and use the ColorABC column as a "pure" expression in the chart.
Tip: type "rgb 0 0 0" in google to easily find the rgb codes