Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

How to compare dates

Hello, I want to create a custom table based on a time comprasion.

I have a table that lists item sold from 01/01/0217 up until today.

I want to create a table with the item sold only in 2017.

My idea would be to do something like

 

LastYear=CALCULATETABLE('Table';Table[date]<01/01/2018).

However this does not work.

  • Hi Anonymous

    Try LastYear=CALCULATETABLE('Table';Table[date]<YEAR(2018,1,1))

1 Reply

  • Arentir's avatar
    Arentir
    Resolver III

    Hi Anonymous

    Try LastYear=CALCULATETABLE('Table';Table[date]<YEAR(2018,1,1))