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
rwhite
Regular Visitor

matching text records between 2 tables, and dividing by a count of text record and another column

Hi,

 

I've been looking around this forum and have tried a few things but I'm unable to get a query working.

 

I have a form that is pulling in data from an api into a table. This form generates a new row for each entry. I'm trying to match the data from the form to a reference list to work out a percentage of how many people have filled in the form from a certain location.

 

here's the example:

 

Form Table columns

 

Entry ID | Location

1 | London

2 | New York

| London

4 | Singapore

 

 

Reference Table columns

 

Location | total number of people

London | 30

New York | 10

Singapore | 5

 

What I'd like to be able to do is show the percentage for each e.g

 

London | 6.66%

New York | 10%

Singapore | 20%

 

I've tried creating a relationship between the Location columns but when 2 duplicate location values are added from the form the relationship breaks.

1 ACCEPTED SOLUTION
rwhite
Regular Visitor

I've got this working now it was a picnic error I had a duplicate value in my reference sheet

View solution in original post

2 REPLIES 2
rwhite
Regular Visitor

I've got this working now it was a picnic error I had a duplicate value in my reference sheet

jthomson
Solution Sage
Solution Sage

Maybe try making a bridging table that combines the location columns from each table and hacks out all the duplicates?

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.