Forum Discussion
Summarizing the differences between months
- Anonymous4 years ago
Hello
The issue was fixed with the following syntax:
Diff =
VAR Diff =
CALCULATE(SUMX('Data','Data'[EUR]) -CALCULATE(SUMX('Data','Data'[EUR]), PREVIOUSMONTH('Date Table'[Date])))
VAR Total =
CALCULATE(SUMX('Data','Data'[EUR]), FILTER('Data', 'Data'[Year/Month] = MAXX(ALL('Data'),'Data'[Year/Month]))) -CALCULATE(SUMX('Data','Data'[EUR]), PREVIOUSMONTH('Date Table'[Date]))RETURN
IF(HASONEFILTER('Date Table'[Year-month]),Diff,Total)
3 Replies
- v-yanjiang-msftCommunity Support
Hi Anonymous ,
According to your description, I need more information.
Is the value showed in your snapshot 'Data'[EUR] or measure Diff, if it's measure Diff, please show the corresponding 'Data'[EUR].
In your first snapshot, you covered the value of 2022-3, 2022-4 and 2022-5, are they blank or zero?
Waiting for your reply.
Best Regards,
Community Support Team _ kalyj - Ashish_MathurSuper User
Hi,
Share the download link of your PBI file.
- AnonymousNot applicable
Hello
The issue was fixed with the following syntax:
Diff =
VAR Diff =
CALCULATE(SUMX('Data','Data'[EUR]) -CALCULATE(SUMX('Data','Data'[EUR]), PREVIOUSMONTH('Date Table'[Date])))
VAR Total =
CALCULATE(SUMX('Data','Data'[EUR]), FILTER('Data', 'Data'[Year/Month] = MAXX(ALL('Data'),'Data'[Year/Month]))) -CALCULATE(SUMX('Data','Data'[EUR]), PREVIOUSMONTH('Date Table'[Date]))RETURN
IF(HASONEFILTER('Date Table'[Year-month]),Diff,Total)