Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I am trying to create a measure to predict current year and future year's data on a trend chart. Like below, I have unites and sales records in one table. I created these two charts by applying a filter, which shows if the record is sales or unit. However, I only have sales forecast data for 2021 and 2022. Using sales YoY changes, I want to create a DAX for unit prediction.
Here is the logic I want to create, and anyone know the correct syntax?
If year(FY First Day) >= year(dateadd(today(),+6,'month')), then previous year's unit*sales YoY change.
For example, in this chart, I want to calculate the sales changes from 2021 to 2022. Using this fraction as a factor to multiply the unit in 2021 to get 2022's prediction.
Below are the dataset...
FY First Day | Amt | Category |
2019-01-01 0:00 | 123 | unit A |
2019-01-01 0:00 | 2,341 | unit B |
2019-01-01 0:00 | 2,323 | sales |
2020-01-01 0:00 | 1,234 | unit A |
2020-01-01 0:00 | 200 | unit B |
2020-01-01 0:00 | 234 | sales |
2020-01-01 0:00 | 2,543 | sales |
2021-01-01 0:00 | 124 | unit A |
2021-01-01 0:00 | 200 | unit B |
2021-01-01 0:00 | 123 | sales |
2021-01-01 0:00 | 3,456 | sales |
2022-01-01 0:00 | 20 | unit A |
2022-01-01 0:00 | 5400 | sales |
Hi @Anonymous ,
Please check if this post could help you: Solved: Running Increase of Forecast based on Actuals - Microsoft Power BI Community.
It calculated forecast vlaues based on actual values.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
In the Table that you have shown, please show the expected result in another column.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
61 | |
56 | |
55 | |
36 | |
34 |
User | Count |
---|---|
77 | |
73 | |
45 | |
45 | |
43 |