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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

Convert excel formula to DAX

I really really need your help converting this excel formula to Dax using columns only.

1. (Weight * PreviousMonth of Actual Volume) (1-Weight) * SmoothedForecast := These are common formulas
2. If 1/1/2019 is no previous month leave it blank
3. If date is on 2/1/2019 the value should be the 1/1/2019 as is.
4. So on my number 1 senario will perform the formulas for entire row

@wdx223_Daniel  apologies to mention you but I also need your experties 🙂

Denski11_0-1602750649035.png

 

1 ACCEPTED SOLUTION

@Anonymous  i think you need a rescusion, but it's sadly that dax can not do it well.  measuse can not reference itself.

probably you need to find another way to solve this.

View solution in original post

4 REPLIES 4
wdx223_Daniel
Community Champion
Community Champion

@Anonymous  please try the code like this, you might do some adjustments to fit in your model

 

SmoothedForecast:=if(isempty(previousmonth(dates[date],-1,month)),blank(),if([Previousmonth],[weight]*[auctualAmount]+(1-[weight])*[Previousmonth], [auctualAmount]))
Anonymous
Not applicable

Hi

SmoothedForecast:=if(isempty(previousmonth(dates[date],-1,month)),blank(),if([Previousmonth],[weight]*[auctualAmount]+(1-[weight])*[Previousmonth], [auctualAmount]))

@wdx223_Daniel 
The problems are I can't call "SmoothedForecast when the next nested if for blank forcasted Smoothed is blank. that should be the actual as is result.

@Anonymous  i think you need a rescusion, but it's sadly that dax can not do it well.  measuse can not reference itself.

probably you need to find another way to solve this.

Anonymous
Not applicable

Yes I agree with you 😞 it can't be called columns result on its column..
This is sad 😞 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.