Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I have monthly aggregated table and I want to do month over month calcualtions. How can I achieve that?
I have a date table linked to YearMonth but it is not helping.
I have to pull aggregated data on Month level otherwise the data size becomes too big.
PS: I have other category columns also so there are multiple rows with same YearMonth.
Thanks for helping
YearMonth | Value | MOM% |
201901 | 15 | |
201902 | 17 | 13% |
201903 | 12 | -29% |
201904 | 14 | 17% |
201905 | 16 | 14% |
201906 | 18 | 13% |
201907 | 20 | 11% |
201908 | 22 | 10% |
201909 | 21 | -5% |
201910 | 19 | -10% |
201911 | 16 | -16% |
201912 | 20 | 25% |
202001 | 22 | 10% |
202002 | 25 | 14%v |
Hi @Anonymous ,
if you have a date table it is easier using PREVIOUSMONTH function. However, you can do it with this measure:
MOM % =
VAR _currentMonth = SELECTEDVALUE('Table'[YearMonth])
VAR _previousMonth = CALCULATE(MAX('Table'[YearMonth]), FILTER(ALL('Table'), 'Table'[YearMonth] < _currentMonth))
VAR _previousValue = CALCULATE(SUM('Table'[Value]), FILTER(ALL('Table'), 'Table'[YearMonth] = _previousMonth))
VAR _currentValue = SUM('Table'[Value])
RETURN
DIVIDE(_currentValue - _previousValue, _previousValue)
Hi @Anonymous ,
You need to have a calendar Table.
I have but it is not working this way.
User | Count |
---|---|
10 | |
9 | |
7 | |
4 | |
4 |