Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlikers,
I'm trying to find a way to put measures in the script. This way it's easier to change expression instead of having to change each principal measure one by one or each variable one by one in the variable console.
Also I would like that this measures reacts depending on my date selecting in a variable.
Please find attached the .qvf to have the proper exemple. How should I write my variables vSummaryDate so that it is properly displayed.
Thanks for your support
I found the solution using this:
LET vSummaryDate = 'ONLY({<MEASURE_DATE={'&chr(39)&'$'&'(vCurrentDate)'&chr(39)&'}>}STATUS_1MONTH)';
LET vSummaryDate1 = 'ONLY({<MEASURE_DATE={'&chr(39)&'$'&'(vCurrentDate1)'&chr(39)&'}>}STATUS_1MONTH)';
LET vSummaryDate2 = 'ONLY({<MEASURE_DATE={'&chr(39)&'$'&'(vCurrentDate2)'&chr(39)&'}>}STATUS_1MONTH)';
LET vSummaryDate3 = 'ONLY({<MEASURE_DATE={'&chr(39)&'$'&'(vCurrentDate3)'&chr(39)&'}>}STATUS_1MONTH)';
LET vSummaryDate4 = 'ONLY({<MEASURE_DATE={'&chr(39)&'$'&'(vCurrentDate4)'&chr(39)&'}>}STATUS_1MONTH)';
LET vSummaryDate5 = 'ONLY({<MEASURE_DATE={'&chr(39)&'$'&'(vCurrentDate5)'&chr(39)&'}>}STATUS_1MONTH)';
Instead of trying to add measures you can try to add the same measures in master visualization
If I add in master visualization or master measures then I will have to change it one by one the day the calculation rules changes. It's easier in the script to perform replaces
I found the solution using this:
LET vSummaryDate = 'ONLY({<MEASURE_DATE={'&chr(39)&'$'&'(vCurrentDate)'&chr(39)&'}>}STATUS_1MONTH)';
LET vSummaryDate1 = 'ONLY({<MEASURE_DATE={'&chr(39)&'$'&'(vCurrentDate1)'&chr(39)&'}>}STATUS_1MONTH)';
LET vSummaryDate2 = 'ONLY({<MEASURE_DATE={'&chr(39)&'$'&'(vCurrentDate2)'&chr(39)&'}>}STATUS_1MONTH)';
LET vSummaryDate3 = 'ONLY({<MEASURE_DATE={'&chr(39)&'$'&'(vCurrentDate3)'&chr(39)&'}>}STATUS_1MONTH)';
LET vSummaryDate4 = 'ONLY({<MEASURE_DATE={'&chr(39)&'$'&'(vCurrentDate4)'&chr(39)&'}>}STATUS_1MONTH)';
LET vSummaryDate5 = 'ONLY({<MEASURE_DATE={'&chr(39)&'$'&'(vCurrentDate5)'&chr(39)&'}>}STATUS_1MONTH)';