new Power BI table combining unrelated data - powerbi

I am trying to create a table that is a list of all possible combinations between two tables: products and companies. I'm building a dashboard in Power BI and the data comes from SQL queries. I have the following list structures for the Products table and the Companies table:
and my desired output for analysis is:
There is nothing that relates the companies to the products, and I'm trying to get a list of all of the products for each company. Can I do this in Power BI? If not, is it possible in SQL (there is nothing to join on)? Thank you for your help!

You can do this with a 'hacked' join, or a cross join. I prefer the former from a process POV, but cannot speak to speed or efficiency.
Using a Join ( Merge in PQ )
Create a new column 'DummyKey' with a value of 1 on each table.
Merge both tables using your 'DummyKey' columns.
Complete the Join process and choose the columns you want to bring through.
Cross Joins in PowerQuery according to MS
I think this 'cross join' is only technically right and does not provide future flexibility.
Both methods will get you to the same end point, and can be done in SQL or PQ.

Related

Join 2 table in power bi

I need help on this issue as i don't have any experience in Power Bi. I want to join 2 table in Power Bi where it have the same column which is Part_Number. How can i make this 2 table to match by Part Number and return the value?
Recon Table
Inventory Table
I would like to have Part Number, Part Name, QTY, Total Quantity as the result. Hope that i can the clarification i need. Thanks a lot!
For this case you simply must merge the tables. It doesn't look like you have done a lot of research on the matter though, so it's hard to understand exactly what you need help with.
To merge your two tables in Power Query, I would right click in the left hand side menu and select Merge Queries as New.
After that you simply follow the on-screen instructions and select your two tables and their respective key columns. After merging you can choose to disable load of your two original tables to save space in your data model, but this depends on your requirements.
If this was my data model, I would think on why joining these tables are necessary, instead of using these two tables as fact tables, and creating a third table to handle the part number dimension with associated part metadata.
Read the docs: Merge queries in Power Query

how to move columns in one table to other table in power bi?

I want to move(denormalize)two tables into another tabe,how can I do it?
have two tables like:- 'sales by category','product by category',
I want to move these two tables into another table which is 'products'.
i tried Related function with calucated column and it won't work bcoz those tables sharing one-one relationship
plz solve my issue who are familiar with data modelling and dax in power bi
The best way is to use the merge function in power query, follow the tutorial on the below link it'll explain it better, this will allow you to join the tables you need into query, in turn creating a table in Power BI
https://learn.microsoft.com/en-us/power-bi/desktop-shape-and-combine-data#combine-queries

power bi: combine multiple tables into one

In Power BI, I am creating a report with some finance data of a company. I have 3 different tables. The table structure of all three tables are as follows:
I want to change these tables into this structure:
Is it possible to achieve this kind of structure? If yes and please suggest some method to do this?
To do it simply you can import 3 times your table using the query editor, and then in one table keep only columns for Planned, in the second table keep columns for Actual, and so on...
Hope that helps!

power bi - how to manage unrelated dimensions

I'm attempting to create a shared date dimensions between two fact tables in Power BI, based off of a relational data source.
Currently, if I include an unrelated dimension in the report, I get numbers duplicated across multiple rows, where they don't really apply.
I'm wondering if there is any way to tell Power BI that certain dimensions cannot be used with certain fact tables, similar to using IgnoreUnrelatedDimensions in SSAS.
Currently the only solution I can find is to create a separate date dimension, so that the two fact tables have no relationship that could be used to join them, however this would mean forfeiting the ability to do any time based comparisons.
Create a combined view of the fact tables with only compatible columns to be used for time based comparison:
In Query Editor, create new queries for your fact tables by
referencing i.e. right click original query and select "Reference".
Then in those "copies" cut out the incompatible dimensions.
Rename columns to align terminology (e.g. Sales Date ==> Transaction Date, Payment Date ==> Transaction Date).
Use "Merge Queries" function to combine the copies using Full Outer Join.
Join this merged view to your date dimension

Power BI: How to merge two tables (loaded plus created table)

I'm struggling with what I assume is a calculated table in Power BI Desktop.
I need to somehow connect my database loaded Accounts table with a manually created Progress table (with some fixed data), so that each row in Accounts basically has a calculated column which is the resulting Progress table for that row. (Hope that makes sense).
[This is the Progress table1
The calculated columns in the Progress table should use data from the related Accounts row to give an overview of where the Account is now, how long it took and the likely future time frames to reach the next levels of progress.
Is there a way to do such a thing?
TIA!
Dennis
I think you have 2 options:
Add a column in the model layer using the DAX LOOKUPVALUE function: https://msdn.microsoft.com/en-us/library/gg492170.aspx
From the Edit Queries window, use the Merge Queries button, then Expand the resulting NewColumn.