March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello,
I am trying to sum distinct values from 2 tables.
Table 1 containts the Part numbers shipped from location 1.
Table 2 containts the Part numbers shipped from location 2.
I would like to have a DAX table created that will sum the total quantity shipped of each part number.
Any Help is appreciated,
Thanks
HI @soldanr
the simplest way to do this is to combine table1 and tabl2, adding an extra column to identify the location.
afterwards, you can summarize this easily with a matrix
if you wanted to do it with a DAX query to create a new table, you can do it like this:
=
GROUPBY (
UNION (
ADDCOLUMNS ( Ship1, "Location", "Location 1" ),
ADDCOLUMNS (
SELECTCOLUMNS ( Ship2, "PN", [PN], "QTYSHP1", [QTYSHP2] ),
"Location", "Location 2"
)
),
Ship1[PN],
"TOT", SUMX ( CURRENTGROUP (), [QTYSHP1] )
)
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
Unfortunately I am using direct query and I don't have the option to create a new table.
I like the union solution, it is very elegant but I can't make it work 😞
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
126 | |
85 | |
69 | |
53 | |
44 |
User | Count |
---|---|
202 | |
106 | |
100 | |
64 | |
56 |