Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Team, My set expression
Sum({< [Ledger] = {"41*"},Year = {'$(=GetFieldSelections(Year)-1)'} >}Ballance)
is perfectly working when i use as an expression in Qlik sense sheet. But as a Set Variable in the script it is not working.
SET lsale = Sum({< [Ledger] = {"41*"},Year = {'$(=GetFieldSelections(Year)-1)'} >}Ballance);
Expression in sheet = $(lsale)
All other expressions are working via SET, but wherever i use Year = {'$(=GetFieldSelections(Year)-1)'} for prior year of selected year, it is showing 0 as output.
I tried SET Previousyear = GetFieldSelections(Year)-1); then used in set but still not working.
Please suggest the wayout...
Thanks
Shiv
Try LET lsale = 'Sum({< [Ledger] = {"41*"},Year = {"$' & '(=GetFieldSelections(Year)-1)"} >}Ballance)' ;
Or
SET lsale = Sum({< [Ledger] = {"41*"},Year = {'@(=GetFieldSelections(Year)-1)'} >}Ballance);
LET lsale = replace($(lsale),'@','$');
Try LET lsale = 'Sum({< [Ledger] = {"41*"},Year = {"$' & '(=GetFieldSelections(Year)-1)"} >}Ballance)' ;
Or
SET lsale = Sum({< [Ledger] = {"41*"},Year = {'@(=GetFieldSelections(Year)-1)'} >}Ballance);
LET lsale = replace($(lsale),'@','$');