Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I have a bar chart with a calculated dimension and a measure.
The calculated dimensions is basically:
If(Status='Closed' or Status='Rejected', 'Removed', 'Accepted')
Measure:
Count(Incident)
I am trying to have a custom coloring for the two calculated status and i have tried the 'By Expression' option like the following:
If(Status='Closed' or Status='Rejected', Red(), Blue() )
So far this is not working and i am just getting blank colors for the measure groupings
This is being done by end users in self-service mode which is why i do not want to just add these new status values in the data model.
Hello,
In that case your only option is to submit a feature request [1]. I understand that it is not optimal to wait for such feature, but as you can see natively only the above workarounds are available.
---
Hello,
There is a workaround that you can do to resolve this issue, but you will have to use custom themes. Here are the steps that I have followed:
1. I have created the chart as you have but with demo data:
2. Now if you go to Appearance > Colors and legend > By dimension you will see that there are only 2 color schemes available:
3. Now follow the instructions here [1] to create a custom theme
4. More specifically we are interested in the custom color schemes (pallets) [2]. You can find that section under Palettes
5. My custom pallets colors part in JSON properties looks like that:
I have created just 2 colors (Red and Green)
6. Load the custom theme in your Qlik Sense App and you will notice that now the color schemes have changed to:
7. After that you can see that applying that color scheme on the chart will give you the output:
8. The only issue is that "Failed" is presented with green and "Success" is presented with red. To resolve this issue you can either change the order of the colors in the custom theme code, or you can go to Edit sheet > Select chart > Sorting and change the sorting, so that Failed will appear second instead of first in the list, therefore the second color will be applied.
Final output is:
I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, please mark it as accepted solution to give further visibility to other community members.
---
Hi,
Maybe you can just modify the calculated dimension and select colors for the values
and then select colors by dimension
Regards,
Vitalii
thnx guys for the suggestions.
But both dont fully work for my case as its meant to be a self-service use case for a business user.
The custom theme coloring will require a big intervention form dev and if i understood correctly will impact all chart objects.
For the colors of the calculated dimension that would work if they are stored as master items.
Sorry if i was not clear in that, this dimension is created by a business user in their community sheet, so moving the logic and coloring to a master item will require a dev intervention, and this dimension does not fit criteria of a master item as we do not want it as an official dimension of the application.
Current the self-service user just created it and is using it in their own charts and sheets.
I was looking for a way to do this from a pure self-service standpoint , so from the community sheet level only.
Hello,
In that case your only option is to submit a feature request [1]. I understand that it is not optimal to wait for such feature, but as you can see natively only the above workarounds are available.
---