Forum Discussion

pmdci's avatar
pmdci
Advocate V
10 years ago
Solved

Calculated column in SSAS tabular: integer showing months passed based on date field

Hello,   Consider a simple fact table in which I have:   CUSTOMER NAME DATE VALUE (this is a overly-simplified example)   What I would like to do is add a calculated column called MONTHS E...
  • pmdci's avatar
    10 years ago

    Found the solution, actually:

     

    =(YEAR(Today())-YEAR(DATE]))*12+MONTH(Today())-MONTH([DATE])

     

    Quite lame of me as it was in the same page as the original formula I found :)