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 moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hello,
I’m trying to make a worst-case scenario analysis of sales. I have the “Estimation” table which holds the estimated ratio of sales over the same month last year. I want to create a measure for moving annual total of sales which will take actual production until current month then the worst-case estimation for future months. “Sales Worst Case” measure seems to be working well. “Sales MAT Worst” is also working well until the first change of ratio (i.e. 01/06/2020)
Any help will be much appreciated…
Sales Worst Case =
calculate (
Sales[Sales Total],
filter (
Dates,
or(
AND(
Dates[Date].[MonthNo]<MONTH(today()),
Dates[Date].[Year]=YEAR(today())
),
Dates[Date].[Year]<YEAR(today())
)
)
)
+
calculate (
Sales[Sales Total Last Year] * max(Estimation[Worst]),
filter (
Dates,
OR(
AND(
Dates[Date].[MonthNo]>=MONTH(today()),
Dates[Date].[Year]=YEAR(today())
),
Dates[Date].[Year]>YEAR(today())
)
)
)
Sales MAT Worst =
CALCULATE (
Sales[Sales Worst Case],
DATESINPERIOD(Dates[Date], LASTDATE(Dates[Date]),-1,YEAR)
)
Estimation Table:
Date | Worst |
01/04/2020 | 0.95 |
01/05/2020 | 0.95 |
01/06/2020 | 0.90 |
01/07/2020 | 0.90 |
01/08/2020 | 0.85 |
01/09/2020 | 0.85 |
01/10/2020 | 0.75 |
01/11/2020 | 0.75 |
01/12/2020 | 0.75 |
Dear @Anonymous,
Many thanks for your suggestions and I'll go through the material. However, in this case, I don't think anything is wrong with the model.
The problem is that a measure which works well, doesn't return the same results when used in MAT calculation...
Best,
Dear @amitchandak,
As I'm making an estimation in to the future, datesytd or total ytd do not help.
Best,
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 | |
| 28 | |
| 28 | |
| 20 | |
| 18 |
| User | Count |
|---|---|
| 65 | |
| 35 | |
| 34 | |
| 25 | |
| 24 |