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
pauliuseg
Helper I
Helper I

how to fill left months with previous month same value

hi all, 

i have quite simple problem , but stucked in it ..

i have table, and latest actuals are March figures.

 

pauliuseg_1-1617830695190.png

 

for mont ago calculation i use simple formula

Profits forecast montago = CALCULATE([Total Profits],DATEADD(Calendar[Date],-1,MONTH)).
and in 2021-April i get March data.
 
the question is how to fill left moths with same data ? 
it's like forecast based on last months actual figures.
maybe something like , first define some variable, and then say .
if (ISBLANK( [Total Profits] ), ..... then return variable  ).
 
not good in dax, but learning in progres..
 
thank you ! 
Paul.
 

 

1 ACCEPTED SOLUTION

hi all,

 i did it via  this, sharing, maybe somebody will be usefull

if (isblank([Total Profit]);CALCULATE( sum(Profits[Total Profits]);DATESBETWEEN( 'Calendar'[Date]; "2021-03-01" ; MAX('Calendar'[Date]) ));"")
 
so instead of 2021-03-01, you can ad something you need some max date or similar
pauliuseg_1-1617896037774.png

 


 

 

 

 

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

hi all,

 i did it via  this, sharing, maybe somebody will be usefull

if (isblank([Total Profit]);CALCULATE( sum(Profits[Total Profits]);DATESBETWEEN( 'Calendar'[Date]; "2021-03-01" ; MAX('Calendar'[Date]) ));"")
 
so instead of 2021-03-01, you can ad something you need some max date or similar
pauliuseg_1-1617896037774.png

 


 

 

 

 

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.

Top Solution Authors