Forum Discussion

Ronald123's avatar
Ronald123
Icon for Resolver III rankResolver III
6 years ago
Solved

Oldest Invoice number by customer

Hello,   I'm looking for a dax measure to find the oldest invoice number (due dates) by customer. Conditions; Ammount greather then 0 Blocked equal to 0 Sames max due dates then the invoice w...
  • v-lid-msft's avatar
    6 years ago

    Hi Ronald123 ,

     

    We can use the following measure to meet your requirement:

     

    Measure =
    MAXX (
        TOPN (
            1,
            FILTER (
                'Table',
                'Table'[Blocked] = 0
                    && 'Table'[Due dates]
                        = CALCULATE (
                            MAX ( 'Table'[Due dates] ),
                            FILTER ( 'Table', 'Table'[Blocked] = 0 && 'Table'[Amount] > 0 )
                        )
            ),
            'Table'[Amount], DESC
        ),
        [Invoice number]
    )

     


    Best regards,