Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Evaluate Measure in Calculated Column with Disconnected Table

Hello,   I have a disconnected table that has 2 values: 2020 and 2021. It is called "Year Filter" and the column is called "Year Filter". I have another table that only has a list of periods. The...
  • v-kkf-msft's avatar
    v-kkf-msft
    5 years ago

    Hi Anonymous ,

     

    I create a table: SlicerValue

    Column1
    1
    2
    0

    And a Calculate Table:

    Calculate Table = CROSSJOIN( DISTINCT('Table'[Period]), SlicerValue )

    Then create measure and filter Column1 field by Measure.

    Measure = 
    var currentyear = SELECTEDVALUE('Year Filter'[Year Filter])
    var selection = IF(currentyear = 2020, 1, IF(currentyear = 2021, 2, 0))
    return IF( MAX('Calculate Table'[Column1]) = selection, 1 )

     

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

    Best Regards,
    Winniz

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