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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Peru123
Frequent Visitor

Forecast Incremental Values with POWER Dax

Hello everyone,

 

I am trying to calculate incremental values based on the latest value. 

As there was a community post very similar to my case, I customized the sample partially.

*some of the VAR or column names doesn't make sense as I kept the names from the sample

 

However, the "else" part of the IF syntax is not calculating correctly. 

Please tell me where I am wrong and how I could fix this.

 

[Sample]

Using the parameter, Growth %

20230512 Sample.png

fy1+(fy2/365) & Forecast = 
VAR _lastSalesMonth = [Last Sales Month (Last Updated)]
VAR _lastMonthTotal = CALCULATE(SUM('indices_eps (Local)'[fy1+(fy2/365)]),ALL('DateTable'),'DateTable'[Date]=_lastSalesMonth)
VAR _thisMonth = MAX('DateTable'[Date])
VAR _power = DATEDIFF(_lastSalesMonth,_thisMonth,DAY)
RETURN
IF(_thisMonth<=_lastSalesMonth,SUM('indices_eps (Local)'[fy1+(fy2/365)]),_lastMonthTotal*POWER(1+[Growth % Value]/100,_power))

 

[My ver. which doesn't calculate "else"]

colmn calculations are the measure calculations with the formula shown as the column name

20230512 Customized.png

Actual & Forecast = 
VAR _lastUpdatedDate = [Last Updated Date]
VAR _lastUpdatedValue = CALCULATE(SUM('indices_eps (Local)'[fy1+(fy2/365)]),ALL('DateTable'),'DateTable'[Date]=_lastUpdatedDate)
VAR _thisMonth = MAX('DateTable'[Date])
VAR _power = DATEDIFF(_lastUpdatedDate,_thisMonth,DAY)
RETURN
IF(_thisMonth<=_lastUpdatedDate,SUM('indices_eps (Local)'[fy1+(fy2/365)]),_lastUpdatedValue*POWER(1+[((fy2-fy1)/fy1)/365)],_power))

 

I appreciate your kind advise and help.

 

Thank you.

 

Peru

0 REPLIES 0

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.