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
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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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