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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Michsara
Regular Visitor

Relating two tables with missing matches

I'm tearing my hair out trying to work this out!  I have 2 tables - one has targets and the other has actuals.  I've tried concatenating a column and have an inactive relationship.  I then used two calculations to get the related targets and actuals:

 

TARGET = CALCULATE(SUM(Targets Table[TARGET]),USERELATIONSHIP('TARGETS TABLE'[MERGE],ACTUALS TABLE[MERGE]))

ACTUALS = CALCULATE(SUM(Actuals Table[Revenue]), USERELATIONSHIP('TARGETS TABLE'[MERGE],ACTUALS TABLE[MERGE]))

 

The join is many to many, both.

 

My problem is that if there is no TARGET, but there is an amount under ACTUAL, or vice versa, it won't show all the data.

Michsara_1-1645093648778.png

Hopefully someone can help before I go bald!

 

 

 

 

2 REPLIES 2
Greg_Deckler
Super User
Super User

@Michsara Not sure I understand exactly but try adding + 0 to the end of both formulas. It's a simple trick so that you don't return null/blank and therefore your rows show up.



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...

Hi @Greg_Deckler 

 

Unfortunately this hasn't helped.  I've mocked up the example in PowerBi. Below are my 2 tables and the joins.

Michsara_2-1645105667432.png

 

Michsara_0-1645105054182.png

Below is my workbook - for some reason there are some targets missing and I can't work out why.  If there is a target but no actual to match, it doesn't show either, but if there is an actual but no target it works

Michsara_1-1645105153528.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.