Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
master_student
Creator III
Creator III

AGGR Expression issue

Hello everyone,

I am using an expression with AGGR function :

Sum (Aggr(  Sum({< $(vSetView)>} POKTND) , LB,Famille,CODE_PROJET,PO_FOURNISSEUR,PO_NUM_COMMANDE,PO_COMMENTS, PO_ACHETEUR,[Month of date], CDR) )

but the problem is that I am using $(vSetView) to show MTD /YTD / Total YEAR data , so that the data change with the selection :

Capture.PNG

$(vSetView)=pick(ViewId,

'$(vSetMTD)',

'$(vSetYTD)',

'$(vSetTotal)')

View:

LOAD * INLINE [

    ViewId, View

    1, MTD

    2, YTD

    3, Total Year

];

any help so that my data change with the selection please?

Thanks

10 Replies
Anonymous
Not applicable

Try using variables in pick function without the $ and quotes:

SET vSetView=pick(ViewId, vSetMTD, vSetYTD, vSetTotal);

And create your variables surrounded by simple quotes

Start with simple and static one like:

SET vSetYTD='[Year of date]={'2016'}';

If this is working then you can adapt progressively the variables complexity.