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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
thebaldkappa
Regular Visitor

Calculate Sum Weirdness

Hi guys,

 

I'm very new to Power BI and would like to get some help.

 

I have linked two Excel tables in Power BI ('Growth Target') and ('Sales') with sample preview below.

 

 

Growth TargetGrowth Target

 

SalesSales

I want to create a YTD Target =  LYTD Sales + Last Month Growth Target + MTD Growth Target

 

The MTD Growth Target measure works just fine. The measure that I use for Last Month Growth Target is

 

Last Month Growth Target = calculate(sum('Growth Target'[Monthly Growth Target]),datesbetween('Growth Target'[Months],date(2017,07,01),EOMONTH(today()-1,-1)))

 

However this measure shows weird behaviour because when I bring them together using the Sales Table, I will get the Total of $50 Last Month Growth Target being applied to non-existing Project Codes (A-012 and A-013). What have I done wrong? Please help.

 

WeirdWeird

 

 

 

 

2 REPLIES 2
v-jiascu-msft
Employee
Employee

Hi @thebaldkappa,

 

It seems you created a wrong relationship. But I can't find more without the model. Could you please provide your PBIX file? You can replace your data with dummy data. 

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
TomMartens
Super User
Super User

Hey,

 

What do you mean by linked, did you create a relationship with an additional table?

 

I would be really helpful if you share a pbix by sharing a link to this pbix file, ideally pointing to the file on onedrive or dropbox.

 

Regards

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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