Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
In Qlik Cloud in a Line Chart in Appearance / Colors and Legend / By Dimension
there is a button to use a formula to set the Dimension (please note i'm talking about By Dimension and NOT By Expression).
Does someone knows what is the syntax to set the Dimension ?
For example, I want to write something like this :
=if([layout.switch_dim.field]=1,Brand,Site)
where Brand and Site are Dimensions in Master Measures (and not fields).
I don't manage to write it
Thanks
hi
may be try
AGRR(
if([layout.switch_dim.field]=1,Brand,Site), Brand,Site)
try like below
if(GetFieldSelections([layout.switch_dim.field])=1,Brand,Site)
Hello,
thanks for your suggestions ;), that's correct but I forgot to precise :
=> I want to write a formula that will return an existing dimension (not a calculted one).
Details :
We are in the color / by dimension part, and I'd like to use an existing dimension there, because I set customs colors on it ( in master measure).
Remark 1 :
By the way, if I use a field with color result in by dimension such as rgb(244,12,10), it will correctly set the color of the graph BUT will display rgb(244,12,10) in Legend 🙂 .
Remark 2: Before you suggest it, If I use Color by expression, first I don't want custom colors on all field values, 2) the legend disapears with expression
Regards