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

summing logic request for a particular development.

hi all,

I have a data set in which we have below 5 columns. Column A,B,C and D has multiple values for multiple dates. I am trying to sum up the column C referring the column B specially for each date .

If B has single value for each date --> D=C

If B has duplicates for same date-->D should be sum of both the corresponding C value.

Below eg: the yellow marked D value should actually be 36 in both rows.(C=18,C=18)

how can we achieve this? Please can someone help me?

hosasahana_0-1609931256856.png

 

6 Replies
Chanty4u
MVP
MVP

what is your measure?

you can try

aggr(yourmeasure),dim)

Anil_Babu_Samineni

You specially, no need to do since Qlik has capable to do by default, But in your case seems not working? Can you check once how is your measure looks like?

Try this and see the length : Len(B)

also measure you can try this way : Sum(TOTAL <B> Measure)

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
hosasahana
Partner - Contributor III
Partner - Contributor III
Author

hi,

My measure is sum (C) which will go into D column to both duplicate rows. grouping should happen on Column B.

I tried aggr(yourmeasure),dim), doesnt work. 

Anil_Babu_Samineni

Check once Len(B) and confirm, If looks good? This is required some workaroung to tune on this with the combination of Trim(), Text() etc.

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
hosasahana
Partner - Contributor III
Partner - Contributor III
Author

hi Anil,

I do not need len function here. I tried with aggr and it worked. 

thanks a lot for your time .

Anil_Babu_Samineni

Glad you made it work, Close this thread by accept the answer yourself with resolution.

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