Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
qvqfqlik
Creator
Creator

aggr() doesn't give correct data

I need some help with Aggr() not working in the expression. Can you please help me with this.

In the promoresultstesting tab

Before using aggr() in the expression for Customer count the data seems to be this. Requirement is to aggregate for the same Offer number

aggr1.JPG

After using aggr() below is how it is happening, total should be 19, but its aggregating into single row

aggr2.JPG

I have attached the file to this. Please help me with this.

13 Replies
petter
Partner - Champion III
Partner - Champion III

You probably pasted the images into your question... they have to be stored and then uploaded with the camera-button... so the  two screenshots are broken for now...

sunny_talwar

You will get an idea of what OP wants from this discussion

Help with Aggr () not working

I don't have any issues with the total, but when OP opens the same file, they see 0 instead of 19

qvqfqlik
Creator
Creator
Author

I uploaded screenshots to this initial post

qvqfqlik
Creator
Creator
Author

I uploaded screenshots to this post. Can you please help me with this.

qvqfqlik
Creator
Creator
Author

can you please help on this.

rubenmarin

Hi, I don't see the issue, wich line you say is aggregating into one line? what is the expected result?

rubenmarin

I think I'm getting now... for what I see there are options where it shows ok in rows and other in totals, so I used a simple If based on dimensionality() to pick each expression.

If this is what you are looking for, credits should go to Sunny, I just copied his work.

qvqfqlik
Creator
Creator
Author

For some reason, when I open the same work into my computer, I see the last total row as 0

rubenmarin

I see '19'. Maybe is because of different version? I'm using QV 12.0 SR5

Captura.PNG