Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Fistachpl
Helper II
Helper II

Calculate the sum of results of a measure / No forecast for a month without sales

I have a measure that calculates for each month:
real sales (if I have data) or a forecast.

Now I would like to calculate the sum of all already sold items (this year) plus the forecast for the remaining of the current year. I get an incorrect result. How can I fix this? MEASURE: Prognozowana sprzedaż

here is the file:

Test DAX.pbix 

 

What am I doing wrong? 
Thank You in advance.

3 REPLIES 3
some_bih
Super User
Super User

Hi @Fistachpl I am glad you resolved it. Other solutions depend on calculation logic / inputs and requirements.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






some_bih
Super User
Super User

Hi @Fistachpl in Tabela1 there are only data up to 20.02.2024, so the question is how to figure out what periods are current vs future / forecast if there is no data?

 

some_bih_0-1714725609239.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Hello,

 

Sales should be until the month previous to the current one. E.g. if there is no sales data fo april and we already have may then for April should be 0, from may till the end of the year should be forecast.

 

I managed to calculate this anyway (was stuck for 2 days with it) but I would like to see other solutions 🙂

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.