Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
1st col.= Report Month
2nd col.= Current Month Value
3rd col.= Previous Month Value
This is the code
previous result =
var period_context = MAX (data [period])
var previous_period =
CALCULATE(
MAX (data [period]),
FILTER(
ALL (data [period]),
data [period] <period_context &&
SUM (data [value]) <> BLANK ()
)
)
var previous_month_value =
CALCULATE(
SUM (data [value]),
FILTER(
ALL (data [period]),
data [period] = previous_period
)
)
Return
if(
ISINSCOPE (data [period]),
previous_month_value
)Solved! Go to Solution.
Add a calendar table to your data model.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 17 | |
| 8 | |
| 8 | |
| 7 |