Forum Discussion

giogio's avatar
giogio
New Member
6 years ago
Solved

Data comparison over time

Hello All! I am struggling with the following problem: I have two tables representing listing of items at two different timeframes (Year 1 and Year 2). Every item is unique and represented by a seri...
  • v-eachen-msft's avatar
    6 years ago

    Hi giogio ,

     

    You could merge these two tables with "full outer" mode.

    Then use three measures to get the results.

    FLOWS =
    VAR a =
        SELECTEDVALUE ( Merge1[FROM] )
    VAR b =
        SELECTEDVALUE ( Merge1[TO] )
    RETURN
        IF (
            a <> BLANK (),
            IF ( b = BLANK (), "RETIREMENTS", IF ( a = b, "SAME", "CHANGE" ) ),
            "NEW"
        )
    # =
    CALCULATE (
        COUNT ( Merge1[Custom] ),
        ALLEXCEPT ( Merge1, Merge1[FROM], Merge1[TO] )
    )
    DETAIL = 
    CONCATENATEX(Merge1,Merge1[Custom],",")

    Here is my test file for your reference.