Forum Discussion
Birdjo
Resolver II
8 years agoCreate table with every employee for every date
Hello, I would like to create a calendar table where for every single date there is a row for every employee ID. I already have a calendar table and a separate Employees table in a SQL database....
- 8 years agoI can't imagine any scenario for such a table. Separate tables have many advantages. Why do you need auch a table and did you overthink your model?
Anyways: combining each record of one table with each record of another table is a Cartesian product. You will finde some solutions with this search term in google, e.g. https://social.technet.microsoft.com/Forums/en-US/8fbf5474-8b83-4a3a-8a52-b538f8499eb8/create-a-cartesian-product-with-power-query?forum=powerquery
Quaxdachs
8 years agoRegular Visitor
I can't imagine any scenario for such a table. Separate tables have many advantages. Why do you need auch a table and did you overthink your model?
Anyways: combining each record of one table with each record of another table is a Cartesian product. You will finde some solutions with this search term in google, e.g. https://social.technet.microsoft.com/Forums/en-US/8fbf5474-8b83-4a3a-8a52-b538f8499eb8/create-a-cartesian-product-with-power-query?forum=powerquery
Anyways: combining each record of one table with each record of another table is a Cartesian product. You will finde some solutions with this search term in google, e.g. https://social.technet.microsoft.com/Forums/en-US/8fbf5474-8b83-4a3a-8a52-b538f8499eb8/create-a-cartesian-product-with-power-query?forum=powerquery
- Birdjo8 years ago
Resolver II
I am making for employee attendance where I need every date by every employee in order to make a relationship with the clock ins and clock outs.
What I did is to make a simple query in SQL.
Another way that I was told in Global Power BI User Group @ Facebook was to add a column with value of "1" in each table and merge them. Very simple and clean.Thank you, I will accept your recommendation as a solution without trying. I believe it works.