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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
JHNunspeet
Frequent Visitor

Measure with Calculate/filter over 2 different tables

Dear co-users,

 

I am using PowerBI  for several months now, had a course and learned a lot from this forum. But I'm still a beginner and this issue I cannot solve, nor find a solution on the internet:

 

In my model, there are 2 measures that are calculated over different tables. These measures are plotted in a line graph.  Seperately they work fine, but when added it gives strange results. As you can see the **bleep**. booked part is not taken righly in the new measure:

 

 

Measure 1 :

Booked = Calculate( sum('GLS actual'[Booked]),
Filter(allselected('GLS Actual'),
'GLS actual'[Posting Date]<=max('GLS actual'[Posting Date])))
 
Measure 2:
 Committed = Calculate( sum(Committment[Commitment]),
Filter(ALLSELECTED(Committment),
'Committment'[Debit date]<=max(Committment[Debit date])))
 
To add them, (measure 3) I just add the measures itself, or copy the formulas:
assigned =
Calculate( sum('GLS actual'[Booked]),
Filter(allselected('GLS Actual'), 'GLS actual'[Posting Date]<=max('GLS actual'[Posting Date])))
+Calculate(
sum(Committment[Commitment]),
Filter(ALLSELECTED(Committment),
'Committment'[Debit date]<=max(Committment[Debit date])))
 
 
How can I add measures 1 and 2 properly?

 

 

1 ACCEPTED SOLUTION
JHNunspeet
Frequent Visitor

The information is not to be public, so I cannot share. Meanwhile I found a solution from a colleague:

**bleep**.assigned = CALCULATE([**bleep**. Booked], filter(allselected('Date'),
'Date'[Date]<=max('Date'[Date]))
)+ CALCULATE([**bleep**. Committed], filter(allselected('Date'),
'Date'[Date]<=max('Date'[Date])))

 

View solution in original post

6 REPLIES 6
JHNunspeet
Frequent Visitor

The information is not to be public, so I cannot share. Meanwhile I found a solution from a colleague:

**bleep**.assigned = CALCULATE([**bleep**. Booked], filter(allselected('Date'),
'Date'[Date]<=max('Date'[Date]))
)+ CALCULATE([**bleep**. Committed], filter(allselected('Date'),
'Date'[Date]<=max('Date'[Date])))

 

Anonymous
Not applicable

Hi @JHNunspeet,

Ok, thanks for sharing the solution. I think it will be helpful if others faced a similar scenario.

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Hi @JHNunspeet,

Can you please share a pbix or some dummy data that keep raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Hello @JHNunspeet 

You can try the below code.
Assigned = Booked + Committed

Hi Tarun, I tried that, but gives the same result

Anonymous
Not applicable

Hello @JHNunspeet 
 
Please check the relationship.
If it doesn't work for you please share the model after removing the sensitive data.

Thank You

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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