Question
· Jul 3, 2017

Deepsee - Functions with Time

Hi everybody, 

I have to create a pivot that shows the result comparing the last week of the current date with the last week of the last year in the same month. I tried using the function LAG, but didn´t work.  Works only if I want to compare the months between the two years.  If someone has some idea, i will appreciatte a lot. 

Thanks.

Jaqueline Krieger

Discussion (4)1
Log in or sign up to continue

Hi Jaqueline,

This Developer Community post has some information that you may find useful: https://community.intersystems.com/post/deepsee-period-date-vs-same-peri...

It deals specifically with comparing results for this year to date versus the same time period in the previous year, but you might be able to apply some of the same concepts when writing your MDX expressions. Let me know if you need clarification, or if this doesn't enable you to make the calculations you intend.

Best,

Sam Duncan