Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I need a measure that copies the data from the last month to the next 2 months (only 2 months) if it is blank? and when you have the real value of the month replace the copied value to the real value of the month.
Solved! Go to Solution.
Hi, @David_Marks
Try this:
Measure =
var _sum=SUM('Table16'[Sale])
var _pre1=CALCULATE(SUM(Table16[Sale]),FILTER(ALL(Table16),'Table16'[Date]=EDATE(MAX('Table16'[Date]),-1)))
var _pre2=CALCULATE(SUM(Table16[Sale]),FILTER(ALL(Table16),'Table16'[Date]=EDATE(MAX('Table16'[Date]),-2)))
var _if=
IF(_sum<>BLANK(),_sum,IF(_pre1<>BLANK(),_pre1,_pre2))
return _if
Result:
Please refer to the attachment below for details.
Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @David_Marks
Try this:
Measure =
var _sum=SUM('Table16'[Sale])
var _pre1=CALCULATE(SUM(Table16[Sale]),FILTER(ALL(Table16),'Table16'[Date]=EDATE(MAX('Table16'[Date]),-1)))
var _pre2=CALCULATE(SUM(Table16[Sale]),FILTER(ALL(Table16),'Table16'[Date]=EDATE(MAX('Table16'[Date]),-2)))
var _if=
IF(_sum<>BLANK(),_sum,IF(_pre1<>BLANK(),_pre1,_pre2))
return _if
Result:
Please refer to the attachment below for details.
Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to work with. Please show the expected outcome.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523