Forum Discussion

nikhil425's avatar
nikhil425
Helper I
7 years ago
Solved

DAX Measure with Conditional Filters

Hi, Can anyone help me with the following DAX measure.    I have a table below like this.    Operation Date Operation Type CashFlow 12/23/2009 Call -15107386.12 12/23/2009 Return of...
  • v-piga-msft's avatar
    7 years ago

    Hi nikhil425,

     

    For your case, please create the measure below and then put it in visual level filter.

     

    Measure 3 =
    IF (
        NOT (
            SELECTEDVALUE ( 'Funds_PI - Operations'[Operation Type] )
                IN { "Valuation", "Cash-Adjusted Valuation" }
        )
            && SELECTEDVALUE ( 'Funds_PI - Operations'[Operation Date] )
                <= MAX ( [Operation Date] ),
        "Y",
        IF (
            SELECTEDVALUE ( 'Funds_PI - Operations'[Operation Date] )
                = MAXX (
                    ALLSELECTED ( 'Funds_PI - Operations'[Operation Date] ),
                    [Operation Date]
                ),
            "Y"
        )
    )
    

     Then you could get the output below.

     

     

    More details, you could refer to the attachment.

     

    Best  Regards,

    Cherry