Forum Discussion

Dsch1971's avatar
Dsch1971
Frequent Visitor
3 years ago
Solved

Filter a measure until today

Hi

 

I have the following measure in a line chart but wnat the line to stop as of today.

 

This is my measure.

 

How can i achieve this please? 

 

Total Wins FY 22 running total in MonthShortName 2 =
CALCULATE(
    [Total Wins FY 22],
    FILTER(
        CALCULATETABLE(
            SUMMARIZE(
                'Date Table',
                'Date Table'[Month Sort],
                'Date Table'[MonthShortName]
            ),
            ALLSELECTED('Date Table')
        ),
        ISONORAFTER(
            'Date Table'[Month Sort], MAX('Date Table'[Month Sort]), DESC,
            'Date Table'[MonthShortName], MAX('Date Table'[MonthShortName]), DESC
        )
    )
)
  • Hi Dsch1971 ,

     There are several ways to do this. Here is one option.

     

    Create a calculated column in your date table Is Before Today.

     

    Something like this:

    IsBeforeToday =
    var currentrowdate= Dates[Date]
    var today = TODAY()
    RETURN
    IF(currentrowdate < today,TRUE(),FALSE())
     
    Then use that calcualted column as a filter for your visual like below:

1 Reply

  • Hi Dsch1971 ,

     There are several ways to do this. Here is one option.

     

    Create a calculated column in your date table Is Before Today.

     

    Something like this:

    IsBeforeToday =
    var currentrowdate= Dates[Date]
    var today = TODAY()
    RETURN
    IF(currentrowdate < today,TRUE(),FALSE())
     
    Then use that calcualted column as a filter for your visual like below: