Forum Discussion

imranamikhan's avatar
imranamikhan
Icon for Helper V rankHelper V
5 years ago
Solved

Return value from column based on today's date

Hi everyone,   Background/Context:   I have the following sample table:     Date Series: a column which contains an iterative list of week ending dates. Baseline: for each row, count th...
  • Mohammad_Refaei's avatar
    5 years ago

    Try this if you want to filter Sunday:

     

    CalculatedBaseline =
    CALCULATE (
        SUM ( Table[Baseline] ),
        FILTER (
            ALL ( Table ),
            Table[Date Series]
                = TODAY () + 7
                    - WEEKDAY ( TODAY (), 2 )
        )
    )

     

     

    For Saturday:

     

    CalculatedBaseline =
    CALCULATE (
        SUM ( Table[Baseline] ),
        FILTER (
            ALL ( Table ),
            Table[Date Series]
                = TODAY () + 7
                    - WEEKDAY ( TODAY (), 1 )
        )
    )