Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
AdrianCittadini
Contributor II
Contributor II

How to differ between Keys?

Hi! I just noticed that, once you Load tables with a field with the same name on it, QView automatically connects them, using this field as a foreign Key.

Problem is, now only ONE column exists. How can I make an expression based on the field of one table or the other?

Example:

AdrianCittadini_0-1673445821455.png

AdrianCittadini_1-1673445836496.png

If I make a variable with COUNT(b_ID) I will get 4 (counting foreign keys of TABLE A). How can I COUNT the b_IDs as a PKey if Table B?

 

Labels (3)
1 Solution

Accepted Solutions
Or
MVP
MVP

Load b_ID, b_ID as b_ID_NoKey, Name

From TableB;

And then count the new renamed field (rather than the key field).

Of course, in the specific example you described here, you could just count Name instead.

View solution in original post

1 Reply
Or
MVP
MVP

Load b_ID, b_ID as b_ID_NoKey, Name

From TableB;

And then count the new renamed field (rather than the key field).

Of course, in the specific example you described here, you could just count Name instead.