Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
qvqfqlik
Creator
Creator

Help with Aggr () not working

I am trying to aggregate the total value of the count result as below. but this is not happening

Sum(Aggr(Count({<RECORD_TYPE = {ORDERED, SHIPPED}>} DISTINCT BILLTOCUSTEDP),OFFERNUM))

I am trying to aggregate the same offernumber

below is before aggregating:

aggr2.JPG

below is after aggregating, the total should be 19 , but it still shows as 18

aggr1.JPG

25 Replies
sunny_talwar

What happens when you add Offer Name to your aggr?

Sum(Aggr(Count({<RECORD_TYPE = {ORDERED, SHIPPED}>} DISTINCT BILLTOCUSTEDP),OFFERNUM, [Offer Name]))

qvqfqlik
Creator
Creator
Author

Below is when I include Offer name, its'nt still not aggregating

promo3.JPG

sunny_talwar

I am not sure what you mean? Do you not want to see the total as 19? What do you want to see?

qvqfqlik
Creator
Creator
Author

Yes, when its aggregated, I want it to to be shown as 19 in a single row. Below , instead of 18 I want it to be 19

aggr1.JPG

sunny_talwar

May be try this:

If(Len(Trim([Offer Name])) > 0, Sum(TOTAL <OFFERNUM>Aggr(Count({<RECORD_TYPE = {ORDERED, SHIPPED}>} DISTINCT BILLTOCUSTEDP),OFFERNUM, [Offer Name])))

qvqfqlik
Creator
Creator
Author

Thanks Sunny , In that row , I got it as 19 , but in the Total row, I still see it as 0

promo4.JPG

Anil_Babu_Samineni

Would you provide application to work on it? We may help you what was the wrong over there?

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
sunny_talwar

May be make sure of Dimensionality() here.... Check what you get for Dimensionality() in the total row and use or condition like this:

If(Len(Trim([Offer Name])) > 0 or Dimensionality() = '---', Sum(TOTAL <OFFERNUM>Aggr(Count({<RECORD_TYPE = {ORDERED, SHIPPED}>} DISTINCT BILLTOCUSTEDP),OFFERNUM, [Offer Name])))

Replace '---' with the number you find when you use Dimensionality() as an expression

sunny_talwar

I guess you deleted your comment, but this might still be useful to see....

Did you read my comment?

Capture.PNG

If you are still not sure, take a look here:

How to use - Dimensionality()

If this doesn't help, I would suggest you to share your app so that we can help you out