Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hallo, I'm fairly new to QlikView,
Im trying to list Customers that made a purchase in the year 2013 and 2014. the Years are selected with an AND-Listbox.
The year- Listbox ist straight forward. The field 'Name' is unique and Joins with a Orders Table.(irrelevant for now)
andYear:
LOAD DISTINCT
Name
resident Rechnung;
JOIN (andYear) LOAD Year as customerYear Resident MasterCalendar;
For the Customer Listbox I was thinking of something like 'select Customer where there is a purchase in the selected years'
I've tried: =($($<Year=>) Name)
Im guessing I'm on the completely wrong track.
Could you please help me out? Seems to be a simple task.
Best Regards
Daniel
Hi Daniel,
It seems a bit confusing that what is your actual requirement.
Kindly u describe it simply.
Regards
Thanks for the reply.
Example:
Bob, Karl and John bought Stuff in the year 2013
Susi, Bob and Frank bought Stuff only in 2014
on selecting the Year 2013 & 2014 the ListBox Customer should only list Bob since he is the only one having a purchase in both years
I guess, instead of having AND mode on year, it should be on Customer.
Of course, on selecting the customer Bob i would get the years 2013+2014. standart.
But thats not the behavior I want.
Found the Solution:
andYear:
LOAD DISTINCT
Name
resident Rechnung;
JOIN (andYear) LOAD Year as customerYear Resident MasterCalendar;
This would Join a Year to every Name resulting in there being no AND to select since the Year is on every Customer.
Changed it to:
andCustomer:
LOAD DISTINCT
Name,
YEAR(Date) as CustomerYear
resident Rechnung;
Expression in the ListBox is no longer needed of course