Forum Discussion

sangeethray's avatar
sangeethray
Frequent Visitor
4 years ago

Current Month vs Last Month - Based on weekdays

Hi Guys,

I was trying to create a comparison between current month & last month sales based on the same weekdays.
For Eg:

When we use Dateadd with month we are comparing  01-02-2022 with 01-01-2022 . 
In my scenario i want to compare,
If 01-02-2022 is a tuesday, i want to compare it with the first tuesday of previous month. ie 04-01-2022.

Any idea?

@amitchandak

2 Replies

  • sangeethray , The best you can do is 28 days behind 

     

    week month behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-28,DAY))

    • sangeethray's avatar
      sangeethray
      Frequent Visitor

      amitchandak I already tried this. But in that case the comparison not accurate when i compare any dates after 29th. It will compare the same month in that scenario.