Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted

Re: Help with Aggr()

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
Highlighted

Re: Help with Aggr()

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

Highlighted
Creator
Creator

Re: Help with Aggr()

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