Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I can't see whats wrong with my code. I'm doing a interval match between my Fact and another table where I calculated some fields. I also have a normal master calender. When I select Year and month from my master calender I want to be able to see the NoOfTimes. It looks OK when I look in the data model view but it's not working...when a selection is made with date from my master calender and if I select the key I get all the occurence from the table NoOfOccurence.
My code:
NoOfOccurence:
Load
%Key ,
Sum(Flag) as NoOfTimes,
Makedate(Left(YearMonth,4) ,MId(YearMonth,5), '01')as Date,
Resident Tmp
Group By %Key,
Date;
Temp_Bridge:
Intervalmatch
(Date, %Key)
Load
FROMDAT,
TOMDAT,
%Key
resident Fact
;
/Thank's 🙂
Hi check if it works
group by should not be done on renamed Fields
it should look like
My code:
NoOfOccurence:
Load
%Key ,
Sum(Flag) as NoOfTimes,
Makedate(Left(YearMonth,4) ,MId(YearMonth,5), '01')as Date,
Resident Tmp
Group By %Key,
Makedate(Left(YearMonth,4) ,MId(YearMonth,5), '01') ;
Regards
Harsha
Thank's Harsha,
Unfortunately this did not help When I run the script the result is the following
I changed the group by to the following:
Group by
%Key,
YearMonth2,
Makedate(Left(YearMonth2,4) ,MId(YearMonth2,5), '01')