Forum Discussion

dk_24's avatar
dk_24
Icon for Helper I rankHelper I
9 years ago
Solved

Week to date sales

Hi All ,   How to implement the below tableau logic in Power BI.   if OrderDate >= DATETRUNC('WEEK',TODAY()) AND OrderDate<= TODAY() then sum(sales) END   Here  DATETRUNC('WEEK',TODAY()) ----> ...
  • Anonymous's avatar
    Anonymous
    9 years ago

    HI dk_24,

     

    You can use below formula to get the week start date.

    WeekStart = [Date] + (1 - WEEKDAY([Date],1))
    

     

    For your scenario, it will be modified like:

    WeekStart = TODAY() + (1 - WEEKDAY(TODAY(),1))

     

    Regards,

    Xiaoxin Sheng