Forum Discussion

GoingIncognito's avatar
GoingIncognito
Advocate III
6 years ago
Solved

Best practice using time intelligence on a table without continous dates?

Hi.

 

What would be the best practice of using time intelligence on a fact table that doesn't have continous dates? I need to count the difference of max interest of the last and penultimate month in the fact table. So like: max interest of last month - max interest of the month before? I do have a calendar table, but last date of calendar date can be later than than the fact tables last date.

 

I assume I could do something like date( year(fact_tables_column), month(fact_tables_column) -1, date(fact_tables_column))

but better version could be something along the lines of maxx(fact_table, calculate(max(interest), dateadd(calendar_table, -1, month))) ?

1 Reply