Forum Discussion

Pepe1989's avatar
Pepe1989
New Member
4 years ago
Solved

Max overall date in columns

Hi everyone,   I'm strugeling to create a measure which will show max date selected by slicer excluding row context filter. e.g. Last Trade Date   I have a reporting date dimension including Dat...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Pepe1989 ,

    You can create a measure as below, please find the details in the attachment.

    Last Trade Date = 
    VAR _sumofamount =
        SUM ( 'Transactions'[Amount] )
    VAR _maxdate =
        CALCULATE (
            MAX ( 'Transactions'[ReportingDateFK] ),
            FILTER (
                ALLSELECTED ( 'Transactions' ),
                'Transactions'[ReportingDateFK] >= MIN ( 'Reporting Date'[Date] )
                    && 'Transactions'[ReportingDateFK] <= MAX ( 'Reporting Date'[Date] )
            )
        )
    RETURN
        IF ( ISBLANK ( _sumofamount ), BLANK (), _maxdate )

    Best Regards