Forum Discussion

GuestUser123's avatar
GuestUser123
Regular Visitor
4 years ago
Solved

Comparison of First Index with the Second one

Hello Everyone, I have a huge dataset with me wherein I have multiple Customer IDs and each ID has multiple entries associated with them. Some IDs have only 1 entry, hence they have only 1 Index and...
  • v-yanjiang-msft's avatar
    4 years ago

    Hi GuestUser123 ,

    According to your description, here's my solution.

    My sample data is the same with yours.

    Create a measure.

    Check = 
    IF (
        MAXX (
            FILTER (
                ALL ( 'Table' ),
                'Table'[CustomerID] = MAX ( 'Table'[CustomerID] )
                    && 'Table'[Index] = 1
            ),
            'Table'[Payment]
        )
            = MAXX (
                FILTER (
                    ALL ( 'Table' ),
                    'Table'[CustomerID] = MAX ( 'Table'[CustomerID] )
                        && 'Table'[Index] = 2
                ),
                'Table'[Payment]
            ),
        "Not change",
        "Change"
    )
    

     Get the expected result.

    I attach my sample below for reference.

     

    Best Regards,

     

    Community Support Team _ kalyj

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