Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

Filter by today's date

Hi, I have a table with sales data for last year and this year. I have visuals that show these data, and I also want to add a visual with today's sales figures.

What is the best way to only filter records with Today's date?

 

Thanks

  • Hi Anonymous,

     

    Add a column in your date table by using the DAX expression below.
    Today = IF(Table1[Date]=TODAY(),1,0)

     

    Then in your visual which you only show today's sales, add a filter like below:

     

    Regards,

    Charlie Liao

2 Replies

  • v-caliao-msft's avatar
    v-caliao-msft
    Microsoft Employee

    Hi Anonymous,

     

    Add a column in your date table by using the DAX expression below.
    Today = IF(Table1[Date]=TODAY(),1,0)

     

    Then in your visual which you only show today's sales, add a filter like below:

     

    Regards,

    Charlie Liao

    • Anonymous's avatar
      Anonymous
      Not applicable

      Worked. Thank you.