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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiplication inside Sum with Total

I'm trying to create a function that is essentially:

SUM(colA * colB * Total ColC)

But it's returning nothing.

The actual expression is a little more complicated:

If(Sum(count) <> 0, Sum([Number of Tickets]),

Sum([curves.curve]*[OP.tixrsrperc]*

TOTAL {<[OP.week_ending_date] = {"$(='>=' & Date(Max({<count = {'*'}>}[OP.week_ending_date], 4)) & '<=' & Date(Max({<count = {'*'}>}[OP.week_ending_date])))"}>}count

/

TOTAL {<[OP.week_ending_date] = {"$(='>=' & Date(Max({<count = {'*'}>}[OP.week_ending_date], 4)) & '<=' & Date(Max({<count = {'*'}>}[OP.week_ending_date])))"}>}[curves.curve]

)

)

I verified all the individual parts work as expected.  Any ideas?

1 Reply
sunny_talwar
MVP
MVP

May be this

Sum(Aggr(

Sum([curves.curve])*Sum([OP.tixrsrperc]) *

Sum(TOTAL {<[OP.week_ending_date] = {"$(='>=' & Date(Max({<count = {'*'}>}[OP.week_ending_date], 4)) & '<=' & Date(Max({<count = {'*'}>}[OP.week_ending_date])))"}>} count)

/

Sum(TOTAL {<[OP.week_ending_date] = {"$(='>=' & Date(Max({<count = {'*'}>}[OP.week_ending_date], 4)) & '<=' & Date(Max({<count = {'*'}>}[OP.week_ending_date])))"}>}[curves.curve]), UniqueIdentifierField))