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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
suepenick
Creator
Creator

Summing a calculated multi part Expression

When I use this expression it works

StdCost * (Sum(if (SaleType='Pontoons', QtyShipped)))

but when I want to Total it, it will not work

SUM ( StdCost * (Sum(if (SaleType='Pontoons', QtyShipped))))

any Ideas?

1 Solution

Accepted Solutions
Not applicable

Or this way

Sum (if (SaleType='Pontoons', QtyShipped*StdCost))

View solution in original post

5 Replies
Not applicable

test the next just add sum the first expression:

sum(StdCost) * (Sum(if (SaleType='Pontoons', QtyShipped)))

regards!!!!

Not applicable

Or this way

Sum (if (SaleType='Pontoons', QtyShipped*StdCost))

Sokkorn
Master
Master

Hi Penick,

Did you try below script yet?

Sum({$<SaleType = {'Pontoons'}>} StdCost*QtyShipped)

Regards,

Sokkorn

suepenick
Creator
Creator
Author

This one made the total go into the billions.

suepenick
Creator
Creator
Author

Thanks!  You can't even know how many different ways I tried to make this work.  and then I look at your solution and want to slap myself on the forehead!   Thanks so much