Forum Discussion

yazenbarakat123's avatar
4 years ago
Solved

Difference in values between 2 months

Hello all!  Im trying to create a measure that calculates the difference between this months (FloatDays)  and Last months  below is the table im using  just a simple calculation like (ThisMonthsF...
  • v-easonf-msft's avatar
    4 years ago

    Hi, yazenbarakat123 

    Please try the following mesaures:

    Last months = 
    CALCULATE (
        MAX ( 'Table'[FloatDays] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[ActivityID] = MAX ( 'Table'[ActivityID] )
                && 'Table'[Month] = EDATE ( MAX ( 'Table'[Month] ), -1 )
        )
    )
    Resilt = IF(ISBLANK('Table'[Last months]),BLANK(), MAX('Table'[FloatDays])-'Table'[Last months])

    Best Regards,
    Community Support Team _ Eason