Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi experts,
My case is that now I have a bar chart with two dimensions (let's call them dimensionA and dimensionB) and one measure. I'm creating a variable (let's call it vCustom) and adding multiple values from Variable Input so that user can select a value from a dropdown list (say now the dropdown list has two values, 'A' and 'B'). Now for some cases (such as vCustom='A') I want both dimension A and dimensionB to be used in the chart, whereas for some cases (such as vCustom='B') I want only dimensionA to be used. Can you advise how I can achieve it?
So far I have tried creating a dummy field (let's call it dimensionC) in my load script, with fixed value across all records, and I use
if(vCustom='A',dimensionB,if(vCustom='B',dimensionC))
as a dimension together with dimensionA. However, it seems that no matter what I select in the dropdown list, only dimensionC is used and dimensionB is totally ignored even though I select 'A' for vCustom.
Anyone can provide insights why is this the case? Thank you.
Dear
You could add both dimensions and use conditonal show.
So dimensionA conditonal show: $(vCustom)='A' or 'B'
So dimensionB conditonal show $(vCustom)='A'.
hope this helps?
Hi thanks for the reply. May I know where is the conditional show? In my Qlik Sense for a dimension, there are only field, label and limitation, but I didn't see any conditional show. May I know which version you're using?
Thanks