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
Anonymous
Not applicable

How to use or replace CALCULATE when we have data in two different (but linked) tables ?

Hi, 

 

I have this measure which works perfectly. 

M: LxD_invoiced_month = CALCULATE(SUM(Joint_data[related amount]),Joint_data[To consider]=true())

 

Tables PNL (1) and Joint_Data (many) are linked with a cardinality (1:many).

 

In order to get the result that I wanted, I had to create the column related amount in Joint_Data  which is :

related amount = RELATED(PNL[Invoice_amount])

 

But I would like to take advantage of this cardinality and to not create a redundant column related amount and use directly Invoice_amount.

 

But the measures below don't work :

M: LxD_invoiced_month = CALCULATE(SUM(PNL[Invoice_amount]),Joint_data[To consider]=true())

 

M: LxD_invoiced_month = CALCULATE(SUM(RELATED(PNL[Invoice_amount])),Joint_data[To consider]=true())​

 

 

Someone to help me ?

Thank you.

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try like

M: LxD_invoiced_month = CALCULATE(SUM(PNL[Invoice_amount]),filter(Joint_data,Joint_data[To consider]))

 

or

 

M: LxD_invoiced_month = CALCULATE(SUMX(Joint_data,RELATED(PNL[Invoice_amount])),filter(Joint_data,Joint_data[To consider]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Try like

M: LxD_invoiced_month = CALCULATE(SUM(PNL[Invoice_amount]),filter(Joint_data,Joint_data[To consider]))

 

or

 

M: LxD_invoiced_month = CALCULATE(SUMX(Joint_data,RELATED(PNL[Invoice_amount])),filter(Joint_data,Joint_data[To consider]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

so obvious..... 🤔
Thanks a lot @amitchandak 

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
Top Kudoed Authors