Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the tables below created in my load script, I also have a normal standard Master Calendar table.
In the presentation I want to be able to select a Year and Month and then do some calculation e.g Measure_1*NoOfTime. I'm stuck on how this should best be modeled.
Fact | |||||
%keyDate | From | Tom | Customer | Measure_1 | Measure_2 |
11/2/2014_12/31/2014 | 11/2/2014 | 12/31/2014 | a | 10 | 100 |
10/2/2014_12/31/2014 | 10/2/2014 | 12/31/2014 | b | 20 | 150 |
NoOfOccurence | |||||
YearMonth | Customer | NoOfTimes | |||
201410 | b | 10 | |||
201411 | b | 11 | |||
201412 | b | 11 | |||
201411 | a | 5 | |||
201412 | a | 3 |
Thankful for some hints
You can use intervalmatch with extended syntax to connect the two tables. First create a date field of your YearMonth: makedate(YearMonth & '01','YYYYMMDD')
Then use intervalmatch:
Intervalmatch(YearMonthDate, Customer) load From, Tom, Customer resident Fact;
You can use intervalmatch with extended syntax to connect the two tables. First create a date field of your YearMonth: makedate(YearMonth & '01','YYYYMMDD')
Then use intervalmatch:
Intervalmatch(YearMonthDate, Customer) load From, Tom, Customer resident Fact;
Thanks :