Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sangeess21
Creator
Creator

Help with Aggr()

I'm trying to get the count of new customers YoY using a pivot table. The expression works fine when no selections are made. But when selections are made based on Quarter within the same year, the result varies hence duplicating the count.


E.g.: Customer 17 with Item 4666ZWJWWNB3DDZ is a new Customer in Q2, 2018. But when I select Q3 it still shows up as new customer and duplicates new customer count by Quarter.

Image1.JPG

Image2.JPG

Any help is appreciated.


Thanks,

Sangeetha

1 Solution

Accepted Solutions
sunny_talwar

Try this may be

Sum(Aggr(If(Customer.Mth_Year = Min({<Customer.QTR=,Customer.Month=, Customer.Year>}TOTAL <[Direct/Indirect Customer Name],[Direct/Indirect],[Service Class],[Service Group]> Customer.Mth_Year), 1, 0),[Direct/Indirect],[Service Class],[Service Group],[Direct/Indirect Customer Name], Customer.Mth_Year))

View solution in original post

2 Replies
sunny_talwar

Try this may be

Sum(Aggr(If(Customer.Mth_Year = Min({<Customer.QTR=,Customer.Month=, Customer.Year>}TOTAL <[Direct/Indirect Customer Name],[Direct/Indirect],[Service Class],[Service Group]> Customer.Mth_Year), 1, 0),[Direct/Indirect],[Service Class],[Service Group],[Direct/Indirect Customer Name], Customer.Mth_Year))

View solution in original post

sangeess21
Creator
Creator
Author

It's working fine now. Thanks a lot. I really appreciate it