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
Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

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.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors