Forum Discussion

ronaldbalza2023's avatar
ronaldbalza2023
Continued Contributor
4 years ago
Solved

Hide future dates

Hi everyone, how to hide the future dates for my cumulative measure? I wanted to hide the future date base on the current filter.

Here's the measure:

Total Sales by Department YTD = 
CALCULATE (
    [Invoiced amount time + total costs],
    FILTER (
        ALL ( 'Date' ),
        'Date'[Financial Year] = MAX ( 'Date'[Financial Year] )
            && 'Date'[Date] <= MAX ( 'Date'[Date] )
    ), 'Date'[Date] <= TODAY() 
)

 

  • ronaldbalza2023 , Try

     

    Total Sales by Department YTD =
    CALCULATE (
    [Invoiced amount time + total costs],
    FILTER (
    ALL ( 'Date' ),
    'Date'[Financial Year] = MAX ( 'Date'[Financial Year] )
    && 'Date'[Date] <= MAX ( 'Date'[Date] ) && 'Date'[Date] <= TODAY()
    )
    )

    or

     

    Total Sales by Department YTD =
    if( max('Date'[Date] <= TODAY()), CALCULATE (
    [Invoiced amount time + total costs],
    FILTER (
    ALL ( 'Date' ),
    'Date'[Financial Year] = MAX ( 'Date'[Financial Year] )
    && 'Date'[Date] <= MAX ( 'Date'[Date] )
    )
    ), blank())

2 Replies

  • ronaldbalza2023 , Try

     

    Total Sales by Department YTD =
    CALCULATE (
    [Invoiced amount time + total costs],
    FILTER (
    ALL ( 'Date' ),
    'Date'[Financial Year] = MAX ( 'Date'[Financial Year] )
    && 'Date'[Date] <= MAX ( 'Date'[Date] ) && 'Date'[Date] <= TODAY()
    )
    )

    or

     

    Total Sales by Department YTD =
    if( max('Date'[Date] <= TODAY()), CALCULATE (
    [Invoiced amount time + total costs],
    FILTER (
    ALL ( 'Date' ),
    'Date'[Financial Year] = MAX ( 'Date'[Financial Year] )
    && 'Date'[Date] <= MAX ( 'Date'[Date] )
    )
    ), blank())