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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
HI everyone,
I have cumulative data that includes common columns for month, year, and region, covering investment data from 2021 to 2024. Since this data is cumulative, I need to extract the value for the last month of each year for each region. Despite trying several DAX formulas, I have not been able to achieve the desired result. Could you suggest a solution?
Solved! Go to Solution.
As long as you have a date table in your model you could use either CLOSINGBALANCEMONTH or CLOSINGBALANCEYEAR depending on what you're looking for.
| Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
Hi @chema ,
Thanks for KNP's reply!
And @chema , I created the sample data myself based on your description:
Then you can use this DAX to create a measure:
LastMonthValue =
CALCULATE(
MAX('Investments'[Value]),
FILTER(
'Investments',
'Investments'[Month_number] = CALCULATE(
MAX('Investments'[Month_number]),
ALLEXCEPT('Investments', 'Investments'[Year], 'Investments'[Region])
)
)
)
And put the measure into the table visual, the final output is as below:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @chema ,
Thanks for KNP's reply!
And @chema , I created the sample data myself based on your description:
Then you can use this DAX to create a measure:
LastMonthValue =
CALCULATE(
MAX('Investments'[Value]),
FILTER(
'Investments',
'Investments'[Month_number] = CALCULATE(
MAX('Investments'[Month_number]),
ALLEXCEPT('Investments', 'Investments'[Year], 'Investments'[Region])
)
)
)
And put the measure into the table visual, the final output is as below:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
As long as you have a date table in your model you could use either CLOSINGBALANCEMONTH or CLOSINGBALANCEYEAR depending on what you're looking for.
| Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 46 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |