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

can not subtotal when use aggr function

Hi all,

Please see below image, Total column calculate 0 (ZERO) against some branches. Which is wrong, it suppose to give me total.

My Expression is below

if(vFromDate >= Sdate1,sum({<T_Date= {'>=$(vFromDate) <=$(vToDate)'} >}Tday),
aggr(sum(if(T_Date>=Sdate1 and T_Date <= vToDate ,Tday)), DECDDT1,Sdate1Branch, [Branch Name],[RSM Name]))

Is anything wrong/modify in expression?

subtotal zero.png

11 Replies
Not applicable
Author

Please Anybody Can Help!!!

Vinay


yevgeniy
Creator
Creator

aggr(

if(vFromDate >= Sdate1

,sum({<T_Date= {'>=$(vFromDate) <=$(vToDate)'} >}Tday),
sum(if(T_Date>=Sdate1 and T_Date <= vToDate ,Tday)),

DECDDT1,Sdate1Branch, [Branch Name],[RSM Name])