Forum Discussion

andybamber's avatar
andybamber
Icon for Helper III rankHelper III
6 years ago

Help with PREVIOUSMONTH

Hello! I'm hoping someone could help me with a query regarding the PREVIOUSMONTH function.

 

I have a fact table containing a column of sales figures, the same table also contains a period key... it doesnt contain any actual dates. This table is linked to a period table using the period key. The period table contains a date column, but the dates are month beginning dates.. so 1/1/20, 1/2/20 etc. It does not contain day by day dates.

 

My question is how i can make the PREVIOUSMONTH function work correctly given the above situation, as a date table with just month beginning dates will not work with the PREVIOUSMONTH function...

 

Thanks in anticipation!

Andy

 

4 Replies