Discussion Board for collaboration on QlikView Scripting.
I have following tables:
Load CustomerID, Customername, CustomerCountry
Resident Customer.qvd (qvd);
Load EndcustomerID, Endcustomername, EndcustomerCountry
Resident Endcustomer.qvd (qvd);
which way is right to make generic keys?
Go to Solution.
Change the load of Facts1 into something like:
SalesPersonID & '|' & YearStart(Date) AS TargetDate
and the last load of TargetsByYear into something like:
// SalespersonID, // Normalized. Which table has more SalesPersonIDs?
SalesPersonID & '|' & YearStart(Date) AS TargetDate,
Does this do the job?
[Edit] Modified the code so that you can get Year Targets by SalesPerson. TargetDate has become a real key that includes the year and the SalesPerson. Just a guess of what you are up to.
I am going to be lazy and say how about dividing Fact2 table into two tables - one is for CustomerID and the other one is for EndcustomerID:
Hope this helps
the problem is, I can't get the date of the targets together with the other date table from Fact1
It seems like the Fact1 table is related to Fact2 table with DocNoID and if you are saying that you cannot get the dates, then it sounds like not all DocNoIDs have dates.
You can post a simple data which could make it easier to understand the issue.
I missed the last part of the script. I think your solution should do the trick.