Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Dax function for today and yesterday dates

Hi All,

 

I want to write dax function for today and yesterday dates because i have multiple dates like today, yesterday, day before yesterday etc..,. So i want to filter today and yesterday date. Can anyone help me on this.

Thanks in advance!

1 Reply

  • Anonymous ,

    a new column

    If([Date] = Today() ||  [Date] = today() -1, 1,0)

     

    a new measure =

     

    countrows(filter(Table, [Date] = Today() ||  [Date] = today() -1 ) )