Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Measure context issue

Hello Everyone,   I am coming to you guys because I have an issue regarding a measure that I was not able to solve yet:     What I would like is to filter Date TO Compare (FIELD of TABLE1)...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous ,

     

    NonContextDate = CALCULATE(MAX('TABLE1'[Context Date]),ALLSELECTED(TABLE1))

    ALLSELECTED will cause some problem if you use it directly. You can try ALL function or you can try this code.

    Max TEST 3 =
    VAR _ADD =
        ADDCOLUMNS ( TABLE1, "NonContextDate", [NonContextDate] )
    RETURN
        COUNTAX ( _ADD, [NonContextDate] )

    Result is as below.

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.