This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Hi Guys,
I have data that is not transactional. Each entry is the current value for that month. Thus it's not data such as sales that can be summed but rather a single value at a point in time.
My objective is to determine the difference between the value for this month and six months prior. All the examples use a variation of this Datesbetween formula:
Hi @JBI ,
For your requirement, you could refer to the measure below. You could modify it based on your scenario.
Measure =
VAR c_m =
CALCULATE (
SUM ( 'Sales'[Project Sales] ),
FILTER (
'Calendar',
'Calendar'[Month] = MAX ( 'Sales'[Month] )
&& 'Calendar'[Date].[Year] = MAX ( 'Sales'[year] )
)
)
VAR c_m_6 =
CALCULATE (
SUM ( 'Sales'[Project Sales] ),
DATEADD ( 'Sales'[Date_column], -6, MONTH )
)
RETURN
c_m - c_m_6
Here is the output.
For more details, please refer to my attchment.
Best Regards,
Cherry
You could try something like
CALCULATE(
SUM(
Sales[Monthly Sales]
)
)
-
CALCULATE(
SUM(
Sales[Monthly Sales]),
FILTER(
ALL('Calendar'),
'Calendar'[Date]=Max('Calendar'[Date]) - 180
)
)
BR
It's still returning the whole table. I want a scalar value returned. Surely there should be a simple way to do calculations like this in PowerBI
Hi @JBI ,
Have you solved your problem?
If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you still need help, please feel free to ask.
Best Regards,
Cherry
Hi,
Did not get solution no. I got a solution on a different feed.
Thanks
Hi @JBI ,
If you get a solution, could you share and accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
Best Regards,
Cherry
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 36 | |
| 33 | |
| 31 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 66 | |
| 55 | |
| 31 | |
| 24 | |
| 23 |