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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Anonymous
Not applicable

Calculate future values based on already calculated value

Hi 

 

Hoping soomeone can help because this is beating me!

 

I'm trying to create a calculated column which gives future fill figures (see below) based on actual inflow and outflow values and the latest fill value. 

The problem i'm having trouble with is trying to reference the predicted value in the 'Future Fill' column when the 'Actual Fill' is blank

 

Untitled.png

I currently have;

Future Fill = CALCULATE(sum(Mytable[Actual Fill]), PARALLELPERIOD(Mytable[Date], -1, month)) - Mytable[Future outflow] + Mytable[Future inflow]

 

This of course is only fine when there is an 'Actual Fill' value, when the value is blank it returns 1, -2 and 4 for the future months as opposed to the desired result above.

 

When 'Actual Fill' is blank i need the formula to use the previous 'Future Fill' value

 

Does anyone have any ideas?

 

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@Anonymous Smells an awful lot like recursion aka previous value which is a no-no in DAX. Previous Value (“Recursion”) in DAX - Microsoft Fabric Community



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

@Anonymous Smells an awful lot like recursion aka previous value which is a no-no in DAX. Previous Value (“Recursion”) in DAX - Microsoft Fabric Community



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler  i had a feeling it wouldn't be pretty! I've been trying all sorts so gives me some comfort that it wasn't me going mad!

 

@Anonymous Nope, not going mad. I have tried for years and years to beat this problem and to no avail. It's like the one unsolvable problem left for me in DAX.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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