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

Dual issue

Hi everyone,

I am have created a line chart. It has a unique temporal dimension which is a variable - $(vDim_Time), an expression which is also a variable - $(cv_exp_Country) - and a label for the expression, which is a variable too - $(cv_lbl_Country). And it works OK.

However, in order to optimize the space of the chart, I want to use the dual function. I have seen a simple example. Please check it below:

Dual(

If(MonthYear=Max(total MonthYear), CategoryType, ''),

Sum(Sales)

)

And according to my project, I wrote the following expression:

Dual(

If($(vDim_Time)=Max(total $(vDim_Time)), $(cv_lbl_Country), ''),

$(cv_exp_Country)

)

But it does not work and I do not have a clue what I am doing wrong. Any suggestions will be highly appreciated.

Thank you in advance.



2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

It's impossible to tell what's wrong without being able to see the data and the contents of the variables. Can you post a small document with the relevant data?


talk is cheap, supply exceeds demand
Not applicable
Author

Gysbert,

Thanks for your response. The definition of the variables mentioned above are:

let vDim_Time = 'Date([AsofMonthYear],' & Chr(39) & 'MMM-YY' & Chr(39) & ';                                             //Dimension

let cv_lbl_Country = 'GetFieldSelections([SubRegion])';                                                                               //Label

let cv_exp_Country= 'sum(TOTAL <AsofMonthYear> Sales)/count(Distinct CalendarMonthYear)';                   //Expression