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: 
NikosAnt
Contributor II
Contributor II

Pivot Totals

Master Item New Amount :

If(INCMG_OUT_IND='I',Sum(ORDRD_AMT_BASE_CCY),Sum(ORDRD_AMT_BASE_CCY*-1),)

I would calculate the Net Amount in Pivot Table  :  ORDRD_AMT_BASE_CCY for INCMG_OUT_IND=Incoming and ORDRD_AMT_BASE_CCY for INCMG_OUT_IND=Outgoing but , the total is wrong

 

 

 

1 Solution

Accepted Solutions
jyothish8807
Master II
Master II

what about this:

sum(If(INCMG_OUT_IND='I',Aggr(Sum(ORDRD_AMT_BASE_CCY),INCMG_OUT_IND,[TXN_DT.autoCalendar.MonthRelNo]),

Aggr(Sum(ORDRD_AMT_BASE_CCY*-1),INCMG_OUT_IND,[TXN_DT.autoCalendar.MonthRelNo])))

Best Regards,
KC

View solution in original post

5 Replies
NikosAnt
Contributor II
Contributor II
Author

Capture.JPG

jyothish8807
Master II
Master II

Hi Niko,

try like this:

If(INCMG_OUT_IND='I',Aggr(Sum(ORDRD_AMT_BASE_CCY),INCMG_OUT_IND,TXN.DT.autoCalander),

Aggr(Sum(ORDRD_AMT_BASE_CCY*-1),INCMG_OUT_IND,TXN.DT.autoCalander))

 

Br,

KC

Best Regards,
KC
NikosAnt
Contributor II
Contributor II
Author

I try this

If(INCMG_OUT_IND='I',Aggr(Sum(ORDRD_AMT_BASE_CCY),INCMG_OUT_IND,[TXN_DT.autoCalendar.MonthRelNo]),

Aggr(Sum(ORDRD_AMT_BASE_CCY*-1),INCMG_OUT_IND,[TXN_DT.autoCalendar.MonthRelNo]))

 

and now the total is null -

 

jyothish8807
Master II
Master II

what about this:

sum(If(INCMG_OUT_IND='I',Aggr(Sum(ORDRD_AMT_BASE_CCY),INCMG_OUT_IND,[TXN_DT.autoCalendar.MonthRelNo]),

Aggr(Sum(ORDRD_AMT_BASE_CCY*-1),INCMG_OUT_IND,[TXN_DT.autoCalendar.MonthRelNo])))

Best Regards,
KC
NikosAnt
Contributor II
Contributor II
Author

Perfect!!!