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
EM2
New Member

Problem with a POWER BI rolling formula (DAX)

Hi everyone 🙂
I have a table in PowerBI that has specific values for each month (Actual) and I have to create a measure that aggregates the values of the next 3 months rolling. But if any of the 3 values is blank, the formula should return a blank value. (so the blue value should be blank).

 
SKUMonthActual (qty)To be cleanAggregate 3 months rolling
71181November3.423 8.166
71181Dicember7651 
71181January3.978  

 

I have created these 2 formulas, but they are not working:

Actual Cleaned =
VAR MaxDate= MAX(Lut_Calendar[Data Calendar])
return
CALCULATE(
SUM(Drop_Forecast[Actual]),FILTER(Drop_Forecast,Drop_Forecast[to be clean]<>1)
)

 

Actual 3M cleaned =
VAR MaxDate= MAX(Lut_Calendar[Data Calendar])
return
IF([Actual Cleaned]<>BLANK(),
CALCULATE(
SUMX('Drop_Forecast 3M',[Actual Cleaned])
,
FILTER(
ALL(Lut_Calendar[Data Calendar]),
AND(
Lut_Calendar[Data Calendar]<=MaxDate,
DATEADD(Lut_Calendar[Data Calendar],3,MONTH)>MaxDate
)
)
),BLANK())

 

Thanks for your help! 🙂

1 REPLY 1
Anonymous
Not applicable

Hi @EM2 ,

 

How is 8.166 calculated? The sum of 3.423,765 and 3.978 is not 8.166.

And also, you may have a date column in your table, right?

                                                                                                                                                         

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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