Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculate the columns with different tables. #94

Open
Nandhini-Kumaresan opened this issue Nov 21, 2023 · 7 comments
Open

Calculate the columns with different tables. #94

Nandhini-Kumaresan opened this issue Nov 21, 2023 · 7 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@Nandhini-Kumaresan
Copy link

Hi,
I want to calculate the columns from different tables. For Example, I want to divide the total customer_id column of sales table with total customer_id column of customer table. Is that possible to do the calculation in the Add Calculate field or Add Measure?
image

@tvc12
Copy link
Member

tvc12 commented Nov 21, 2023

Hi @Nandhini-Kumaresan,
Add Measure field is a answer for this question. Calculated field work only in one table.

@tvc12
Copy link
Member

tvc12 commented Nov 21, 2023

Please replace [ and ] by empty string and try again. That is a problem when create measure field. We will release fixed in next release.

@tvc12 tvc12 self-assigned this Nov 22, 2023
@tvc12 tvc12 added the help wanted Extra attention is needed label Nov 22, 2023
@Nandhini-Kumaresan
Copy link
Author

Hi @tvc12,
I tried replacing [and] with an empty string, still i am getting the error.
image
I used dbname.tablename.columnname to define a different table column. Is this the one that should be used?

@tvc12
Copy link
Member

tvc12 commented Nov 23, 2023

try with expression below:

count(entity_id) - (select count(mysql_db.sales_order.customer_id) from mysql_db.sales_order)

If it's not work, use can create view table by using Query Analysis. Following step 6 in documentation in here

@Nandhini-Kumaresan
Copy link
Author

Tried the given expression, it shows error.

image

Will try to create view table using Query Analysis and let you know.

@tvc12
Copy link
Member

tvc12 commented Nov 28, 2023

Hi @Nandhini-Kumaresan ,
Message error: Missing columns. Please check column names and try again.

@Nandhini-Kumaresan
Copy link
Author

Hi @tvc12 ,
The column name is exist but in another table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants