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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
ompowerbi
Helper I
Helper I

Incomplete Mapping Table

Hi, I have two tables, the first is like this:

CountrySales
France£10000
UK

£5500

UK

£6000

Italy

£2000

I then have a second table:

CountryCode
FranceFR
UKUK

 

I create a relationship between the tables and want to make a complete table like this:

CountrySales Code
France£10000FR
UK

£5500

UK

UK

£6000UK

Italy

£2000

 

There is no mapping for Italy. Above is the result I want. The result I get is:

CountrySales Code
France£10000FR
UK

£5500

UK

UK

£6000UK

 

Italy is excluded as it has no mapping value. How can I make it so if there is no mapping value it just returns blank and the table simply fills in what it can. Thanks. 

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @ompowerbi ,

Here are the steps you can follow:

1. Create calculated table.

Table =
SUMMARIZE(
    'Table1','Table1'[Country],'Table1'[Sales],"1",
    MAXX(FILTER(ALL(Table2),'Table2'[Country]='Table1'[Country]),[Code])
)

2. Result:

vyangliumsft_0-1663316446650.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

4 REPLIES 4
v-yangliu-msft
Community Support
Community Support

Hi  @ompowerbi ,

Here are the steps you can follow:

1. Create calculated table.

Table =
SUMMARIZE(
    'Table1','Table1'[Country],'Table1'[Sales],"1",
    MAXX(FILTER(ALL(Table2),'Table2'[Country]='Table1'[Country]),[Code])
)

2. Result:

vyangliumsft_0-1663316446650.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Genius 

AnthonyJoseph
Resolver III
Resolver III

Hi @ompowerbi ,

 

Can you try "Merge query" in Power query editor to get the "Code" column and then filter the row that are not blank....

 

Thanks,

AnthonyJoseph

Thank you, bit unsure of how Merge Query works I apologise

 

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

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