cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
anongard Regular Visitor
Regular Visitor

Arithmetic across tables w/ many:one relationship

Hey all,

 

I've got two tables, one with 640 records, one with ~14,000. The 640 are a subset of the 14,000, but from a different database. There is a common field, call it User ID. I've set up a relationship between the two tables - BI tells me it can only be Many: One. 

 

I am now trying to do math with two separate fields. I created a new column in Table A, and tried to insert the expression ='TableB'[ColumnB] / 'TableA'[ColumnA]. Two things: First, in the autocomplete dropdown menu, when I hit ', only entries for TableA autopopulate, leading me to think there's an issue with recognizing the relationship between the two tables. Second, when I finish the expression and hit enter, I get the error message "A single value for column 'UserCount' in table 'ViewAccounts' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result."

 

I'm not sure what this means or why I am not able to complete this operation. There shouldn't be a single value for UserCount, each record has a different count. That's the point. 

 

I'm assuming it doesn't recognize the relationship between the two columns, and so it won't do the math for the records that match between tables. I thought I was doing this correctly, but apparently not. Any help is appreciated. Thank you! 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team
Community Support Team

Re: Arithmetic across tables w/ many:one relationship

@anongard,

 

Better to share us some sample data and the expected result. You may do research into RELATED Function first.

Community Support Team _ Sam Zha
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

1 REPLY 1
Highlighted
Community Support Team
Community Support Team

Re: Arithmetic across tables w/ many:one relationship

@anongard,

 

Better to share us some sample data and the expected result. You may do research into RELATED Function first.

Community Support Team _ Sam Zha
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

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors