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

Announcements
Note: You may notice some temporary visual or styling issues in the Community. Our vendor is actively investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
master_student
Creator III
Creator III

Total qv

Hi ,

My pb is that the total displayed in Qlikview is different from the one after excel extarct.

My expression is:

sum( {< $(vSetView)>} POKTND)


with : $(vSetView)

=pick(ViewId,

'$(vSetMTD)',

'$(vSetYTD)',

'$(vSetTotal)')


so that the values of my measures change with the selection : MTD/YTD/Total year

Capture.PNG


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


The result is : it does taking into account the selection YTD and the total of June is not correct :


Capture.PNG



I would like the result to be a pivot table with total measures= extract excel


Capture.PNG


Any help please.


Thanks

4 Replies
swuehl
MVP
MVP

It's hard to answer these kind of questions without actually being able to see the data model and values.

In general, you might need to apply the set expression also to the outer aggregation function:

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


Set Analysis in the Aggr function

master_student
Creator III
Creator III
Author

Thanks for your reply,

I get error in expression when I did as you recommended.

Digvijay_Singh

Can you share complete expression behind  $(vSetView), not able to see left part before equal sign of the set modifier  like {<Field = {Element list}>}

master_student
Creator III
Creator III
Author

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



$(vSetView) is a varialble to display the MTD/YTD/Total years values