Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dollar sign expansion per dimension

I am trying to work with persistent colors for my dimensions and I also want to be able to switch between different color themes (applying this: Color Logic – loading multiple Color schemes

To do that, I have for each of my dimensions added a field for color. The records in the field are named color1, color2 etc. In another table, I have a matrix with colors with fields named color1, color2 etc. and in each field I have a number of different RGB codes, each referring to a specific color theme.

What I want to achieve is to evaluate the color field for the dimension (for instance color1) and achieve the corresponding RGB-values from the color matrix. However, I am not able to do that.

I can get the color when I select only one dimension, but not without selecting one. I guess this has something to do with how the $-expansion works (read something about), but I have not been able to find a workaround. Does anybody have any idea of how to solve it?

P.S. It's actually a workaround for this question to which I have not received any answer. If anybody has an answer to that, it would be even better 🙂

Color() does not work with expression in charg

1 Solution

Accepted Solutions
Not applicable
Author

Thanks for the suggestion. Unfortunately, I cannot open it at the moment (will do so tomorrow), but I think I understand what you mean (adding the color to each dimension). If so, it would have worked if I only had one dimension, but I do in fact have many different ones (and I want to be able to switch between them through a data island). And I don't want to create circular keys in my data model.

But I was finally able to figure it out myself . See the attached file. It is not the best example. In reality, I have one large fact table with several independent dimensions such as Region and Segment, but I think this example is enough for understanding.

But anyway, thanks for the answer and the proposal. And I am sure it would have worked if my demands would have been different.

View solution in original post

2 Replies
swuehl
MVP
MVP

Maybe like attached, linking the colors to the dimensions in the data model.

Not applicable
Author

Thanks for the suggestion. Unfortunately, I cannot open it at the moment (will do so tomorrow), but I think I understand what you mean (adding the color to each dimension). If so, it would have worked if I only had one dimension, but I do in fact have many different ones (and I want to be able to switch between them through a data island). And I don't want to create circular keys in my data model.

But I was finally able to figure it out myself . See the attached file. It is not the best example. In reality, I have one large fact table with several independent dimensions such as Region and Segment, but I think this example is enough for understanding.

But anyway, thanks for the answer and the proposal. And I am sure it would have worked if my demands would have been different.