Hi all, I have 2 tables, one is Product & one is Month (12 months), how can I join 2 tables together? I mean add every month from table Month to table Product like picture bellow?
Thanks for your help!
Audrey Abbey
Member
February 12, 2018 at 11:50 PM
Hi Tung,
These tables do not share a column.Ā The results you show is called a Cartesian Product.Ā In the code, we use a cross join to do that.Ā
You can also add a Custom Column via Query Editor and add the query for one table as a column for the other.Ā Or add a custom column to each table, and populate with the value 1. Then merge the tables on that column.Ā
I am sure there are a few other ways to achieve it…but that should get you started.Ā
Best,Ā Audrey
—————————— Audrey Abbey SR. BI Developer/Analyst New Seasons Market Portland OR —————————— ——————————————-
Thanks for your information, Abbey.——————————————-
Tara Prasad Gumansingh
Member
February 13, 2018 at 2:17 AM
Hi Tung Pham,
Just create a relationship between these two tables on No.(If possible change the Month No. to only No.) 1 – While creating the report take the Month from Month table and the rest from other one. 2 – If you want the same thing on Data table then you can pull it by using Lookup formula.
—————————— Tara Prasad Gumansingh Data Analyst Bangalore —————————— ——————————————-
Bruce Montemayor
Member
February 13, 2018 at 5:06 AM
Why do you want to? If you are wanting to count or sum by month, the ideal thing would be to add a date table to the model and relate it to sales and orders and any other table containing dates. Then you will be able to aggregate counts and sums by any date dimension from any table.
Thank You,
Bruce Montemayor
——Original Message——
Hi all, I have 2 tables, one is Product & one is Month (12 months), how can I join 2 tables together? I mean add every month from table Month to table Product like picture bellow?
Thanks for your help!
William Rodriguez
Member
February 13, 2018 at 10:17 AM
Greetings @TungĀ Pham :
is correct. Below illustratesĀ her ?recommendation
Please note:
This action will also remove this member from your connections and send a report to the site admin.
Please allow a few minutes for this process to complete.
Report
You have already reported this .
Welcome to our new site!
Here you will find a wealth of information created for peopleĀ that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!