Announcements
cancel
Showing results for
Did you mean:
Creator

## need to distinct sum of volume for each ticket

i have tktcode, material and volume, sales, material, i need to sum of distinct volume for each ticket.

for same tktcode i have several rows are there because material is different , but volume and sales willl be same for each tktcode.

if sum(volume), if will sum of all volume is 80, idealy it should be, volume should 35 ,. , now i need to write to take sum of distinct volume for each ticketcode, if two tktcodes have same volume, it should consider both volumes because tktcodes are different ,. kindly help me to to get sum of distict volume for each tktcode. i need that in kpi.

if i use sum( distinct volume), if will neglect volume if two different tktcode have same volume.

the formula it should interact with filters like some one slected some tkt codes, the formula should  according to filter selction. it's very urgent kindly help me

 tktcode Material Volume Sales materialcost 1 a 10 20 10 1 b 10 20 20 1 c 10 20 30 2 d 10 30 30 2 a 10 30 20 3 e 15 30 23 3 b 15 30 21
Labels (2)

• ### SaaS

6 Replies
Partner - Master

Try

=Sum(Aggr(Only(Volume), tktcode))

Creator
Author

@BrunPierre , Thanks for the reply, the above formula is working, same formula i need to adjust in below formula . can you pease help me with also, i new to qlik

(sum({1<MonthYear ={'\$(vCurrentMonth)'} >}volume)

Partner - Master

?

=Sum(Aggr(Only({1<MonthYear ={'\$(vCurrentMonth)'}>} Volume), tktcode))

Creator
Author

@BrunPierre , Thanks you reply, when iam using formula to YOY growth, iam not data, i used below formula. Kindly help me

(Sum(Aggr(Only({1<CYTD ={1}>} amount), tkt_code)) -Sum(Aggr(Only({1<PYTD ={1}>} amount), tkt_code))) /Sum(Aggr(Only({1<PYTD ={1}>} amount), tkt_code)),

Partner - Master

@Swathi any responses might be based solely on assumptions, can you either share the app or post data and what you expect as outcome?

Creator
Author

@BrunPierre ,it is giving 0%, but have some percentage difference, that is wrong.

even other place iam using below formula previously, iam getting current previous bubbles data

Sum({<Period,[MonthYear]={ ">=\$(=(vMinYearMonth) )<=\$(=(vMaxYearMonth) )" }>+
<Period,[MonthYear]={ ">=\$(=(vLimitPrevious_Min) )<=\$(=(vLimitPrevious_Max) )" }>} amount)

now i am using below formula it is giving only 2024 data currently, 2023 it is zero

Sum(Aggr(only({<[MonthYear]={ ">=\$(=(vMinYearMonth) )<=\$(=(vMaxYearMonth) )" }>}amount),tkt_code))+
Sum(Aggr(only({<[MonthYear]={ ">=\$(=(vLimitPrevious_Min) )<=\$(=(vLimitPrevious_Max) )" }>}amount),tkt_code))

Kindly check these