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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
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.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.