Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
becki_kain
Contributor III
Contributor III

Total which does not change

I need to calculate the total volume of sales, by each time period and i need that value of those to not change, if the user selects a segment of the vehicle types.  if i use =sum({<[TP]={$(TP1)}>} ALL Volume), where TP1 is a user entered value, I get an unchanging sum of all volumes in the data set, for all time periods, not the sum volume of all in the set of TP1. if i do this =sum(ALL{<[TP]={$(TP1)}>} Volume), the sum volume is changed, when the user clicks on a vehicle type.  that is also the case with =sum({<[TP]={$(TP1)}>} TOTAL Volume) no matter when I put the word TOTAL.  How do I sum the total volume of sales, for each time period, without it changing if the user selects a vehicle segment?


thanks


becki kain

1 Solution

Accepted Solutions
sunny_talwar

May be this

=Sum({1<[TP]={$(TP1)}>} TOTAL <[TP]> Volume)

or this

=Sum({1} TOTAL <[TP]> Volume)

View solution in original post

6 Replies
sunny_talwar

May be this

=Sum({1<[TP]={$(TP1)}>} TOTAL <[TP]> Volume)

or this

=Sum({1} TOTAL <[TP]> Volume)

Anil_Babu_Samineni

Perhaps this?

Sum({1} TOTAL <[time period]> Volume)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
becki_kain
Contributor III
Contributor III
Author

thanks!  it was =sum({1<[TP]={$(TP1)}>}TOTAL Volume)

do I have to save and reload every time I change a variable definition? 

becki_kain
Contributor III
Contributor III
Author

no,that didn't work but thanks.  I put in the answer above.  thank you!

sunny_talwar

If you are loading the variable in the script... then yes, otherwise you can make the change in variable overview

becki_kain
Contributor III
Contributor III
Author

thanks.  yeah, these are variables in the variable settings not load script because they change with user entered values

thanks again!  this is NOT user friendly (for the first couple of weeks)