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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JaclynPugh2022
Helper II
Helper II

Incorrect Total on VAR Rolling 3 Months Forecast Projection

I have a rolling monthly forecast formula showing monthly totals, but the Grand Total is incorrect.  I cannot use SUMX(VALUES to correct this, as it will eliminate the forward projection on the forecast.  Any suggestions please?

 

Spend Forecast based on last 3 Mo =

VAR Spend1MonthAgo = CALCULATE([Received Spend], DATEADD('DimDate1'[Date],-1, MONTH ) )

VAR Spend2MonthsAgo = CALCULATE([Received Spend], DATEADD('DimDate1'[Date],-2, MONTH ) )

VAR Spend3MonthsAgo = CALCULATE([Received Spend], DATEADD('DimDate1'[Date],-3, MONTH ) )

RETURN DIVIDE( Spend1MonthAgo + Spend2MonthsAgo + Spend3MonthsAgo, 3 , 0 )

 

Result is correct subtotals, but incorrect Grand Total:   (Should be $21,627 not $32,168)

JaclynPugh2022_0-1657223511429.png

 

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@JaclynPugh2022,

 

You may need to create a second measure that references the main measure. Assuming you have a dimension column like DimDate[Month] in your visual, you could try this measure:

 

Rolling Avg Cost 3 Mo =
SUMX ( VALUES ( DimDate[Month] ), [Spend Forecast based on last 3 Mo] )

 





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

Proud to be a Super User!




View solution in original post

2 REPLIES 2
DataInsights
Super User
Super User

@JaclynPugh2022,

 

You may need to create a second measure that references the main measure. Assuming you have a dimension column like DimDate[Month] in your visual, you could try this measure:

 

Rolling Avg Cost 3 Mo =
SUMX ( VALUES ( DimDate[Month] ), [Spend Forecast based on last 3 Mo] )

 





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

Proud to be a Super User!




Thank you very much this worked!!!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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