Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
User | Count |
---|---|
25 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
25 | |
12 | |
11 | |
10 | |
6 |