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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
cristianml
Post Prodigy
Post Prodigy

Help with DAX Formula for 2 tables

Hi,

I need help to fix an issue I have. I'm trying to Sum 2 tables but with some king of restriction. I have these 2 tables and I need to sum both columns of amounts but considering only the Actuals in Ad doc costs table till a change happen in "FT Forecast 4QF" in the column of "Actual or Forecast" :

 

Ad hoc costs
 PostingPeriod  Amount  Actual or Forecast 
Sep-18  12,000.00Actual
Oct-18  12,000.00Actual
Nov-18  12,000.00Actual
Dec-18  12,000.00Actual
Jan-19  12,000.00Actual
Feb-19  12,000.00Actual
Mar-19  12,000.00Actual
Apr-19  12,000.00Actual
May-19  12,000.00Actual
Jun-19  12,000.00Actual

 

FT Forecast 4QF 
 PostingPeriod  Amount  Actual or Forecast  
Sep-18                 -  Actual 
Oct-18                 -  Actual 
Nov-18                 -  Actual 
Dec-18                 -  Actual 
Jan-19                 -  Actual 
Feb-19                 -  Actual 
Mar-19                 -  Actual 
Apr-19                 -  Actual 
May-19  12,000.00ForecastIssue part
Jun-19  12,000.00ForecastIssue part
Jul-19  12,000.00Forecast 
Aug-19  12,000.00Forecast 
Sep-19  12,000.00Forecast 
Oct-19  12,000.00Forecast 
Nov-19  12,000.00Forecast 
Dec-19  12,000.00Forecast 

 

To see this better in the model, I tried 2 different DAX formulas but, with both I have a different issue:

 

In this case If I try this formula the AMOUNT is NOT coming into the Visual:

1.jpg

 

With this formula the issue is in the periods that are duplicated from both tables:

2.jpg

 

 

This should be the correct one              
Sep-18Oct-18Nov-18Dec-18Jan-19Feb-19Mar-19Apr-19May-19Jun-19Jul-19Aug-19Sep-19Oct-19Nov-19Dec-19
  12,000.00  12,000.00  12,000.00  12,000.00  12,000.00  12,000.00  12,000.00  12,000.00  12,000.00  12,000.00  12,000.00  12,000.00  12,000.00  12,000.00  12,000.00  12,000.00

 

How could I fix this ? 

 

Thanks 

 

 

 

2 REPLIES 2
parry2k
Super User
Super User

@cristianml how these two tables are related? I guess you have date dimension with which these tables are related?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi @parry2k ,

 

Yes, These to tables has many relationship and are related, it works perfect.  The only thing is to figure out that particular case I mentioned before. It occured to me that I can use a Dax formula Based on other column.  

In my head I think something like this: calculate/sum only with this condition:

 

Calculate the SUM of Ad Hoc Cost table considering the MAX Date in FT Forecast "Actual or Forecast" filtered by "Actual" 

 

rrr.jpg

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors