Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
c1bs
Contributor II
Contributor II

Aggregate Function not showing on all rows

Hi forum,

I have a problem with my visualizations on QlikView. I want to calculate Quantity per Month based on the value from the Quantity and per Code itself (Code field contain several values also).  

Currently, my aggregate function not showing on all rows as you can see like the sample below:

c1bs_0-1678197672628.png

It only shows on one row and showing NULL on other rows. What I want is to show it on all rows.

Some notes:
1. The red marked are the expressions (Month & Qty per Month)

Month = Date([Date of Transaction]),'MMMYY')

Qty per Month = Aggr(Sum([Quantity]),[Month],[Code])

2.  Somehow, I can't solve this by Editing the Script, I can only work this by using expressions.

3. Please assume that all fields have other values also, not like the sample above.

 

Thank you and hopefully I get feedback very soon from the forum.

Cheers!

 

 

Labels (1)
1 Solution

Accepted Solutions
E_Røse
Creator II
Creator II

Try to add the nodistinct keyword within your aggr function.

When you leave that out, the aggr-function will only fill one value per combination of  Month and code. With nodistinct, the value will berepeated for each row.

Please like and mark my answer as a solution, if it resolved your issue.

View solution in original post

2 Replies
E_Røse
Creator II
Creator II

Try to add the nodistinct keyword within your aggr function.

When you leave that out, the aggr-function will only fill one value per combination of  Month and code. With nodistinct, the value will berepeated for each row.

Please like and mark my answer as a solution, if it resolved your issue.

c1bs
Contributor II
Contributor II
Author

Thank you!