Forum Discussion

Jeffuh's avatar
Jeffuh
New Member
4 years ago
Solved

Creating a Filter for a Specific Week

Good Evening:   I am trying to create a report that shows historical data for sales for a specific week, in this case Mother's Day.  My report has all the sales data for each year, so I am trying t...
  • Anonymous's avatar
    Anonymous
    4 years ago

    HI Jeffuh,

    You can create a  calculated column with the following formulas to check the Second Sunday of May and return the tag:

    2nd Sunday of May=
    IF (
        //the second week of May
        WEEKNUM ( Table[Date], 2 )
            = WEEKNUM ( DATE ( YEAR ( Table[Date] ), 5, 1 ), 2 ) + 1
            && //sunday
            WEEKDAY ( Table[Date], 2 ) = 7,
        "Y",
        "N"
    )

    Regards,

    Xiaoxin Sheng