Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I have a list of products and the month/year that they were first launched...
I want to see the min year of this.
I can calculate this simply using min(Year) as an expression in a pivot table. However I want this to be calculated in the script editor as a dimension so that I can use it in a pivot table -
any ideas?
Thanks
I'm not sure if I completely understand your requirement (it's rather slim on details), but let's assume that the use date is present in a facts table, together with the product ID (let's call that one Material). Then in your script, add the following after you load the facts:
LEFT JOIN(Facts)
LOAD Material, min(Year(UseDate)) AS FirstYearUsed
RESIDENT Facts
GROUP BY Material;
Best,
Peter
I'm not sure if I completely understand your requirement (it's rather slim on details), but let's assume that the use date is present in a facts table, together with the product ID (let's call that one Material). Then in your script, add the following after you load the facts:
LEFT JOIN(Facts)
LOAD Material, min(Year(UseDate)) AS FirstYearUsed
RESIDENT Facts
GROUP BY Material;
Best,
Peter
Lovely job - thanks