Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I need to create a new table and merge two other tables into this one.
One table contains invoiced information and the other table has current order information.
There are some columns that should be merged into the same column as "Customer name", "Item id", "Description" and so on but there are also different information that must go in seperate colums as "Sold qty", Invoiced qty" and so on.
Solved! Go to Solution.
You can create your customer table using DAX expression, as an example below.
Customers =
DISTINCT(
UNION(
ALLNOBLANKROW( orders[CustomerKey], orders[Name] ),
ALLNOBLANKROW( invoices[CustomerKey], invoices[Name] )
)
)
Or use Power Query
Are you sure, that you want to merge these tables?
There could be a situation where you have two or more invoices per order and vice versa, this situation would potentially create duplicate values.
Would it not be easier to keep these tables separate and create dimension tables ( customers, Items ) with relationships to both Invoice and order tables
Hi @Mariusz
That is one way to do it.
Unfortunately I don't have a table with customer id.
There might be situations where I have customers with open orders and no invoices so they will not be in the invoice table.
I would like to be able to have a matrix with invoiced & current orders for the customer and also be able to look into each product.
/Sebastian
You can create your customer table using DAX expression, as an example below.
Customers =
DISTINCT(
UNION(
ALLNOBLANKROW( orders[CustomerKey], orders[Name] ),
ALLNOBLANKROW( invoices[CustomerKey], invoices[Name] )
)
)
Or use Power Query
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
84 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |