Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I have a challenge at work where I need to take a list of vendors, which contains a significant amount of duplicates, create a distinct table of vendors and within that table have a column that has the total quantity supplied by the vendor. Here is an example data set below:
Vendor Name | QTY Supplied |
---|---|
Vendor A | 5 |
Vendor A | 3 |
Vendor A | 1 |
Vendor B | 2 |
Vendor B | 3 |
Vendor B | 1 |
Vendor C | 7 |
Vendor D | 2 |
I need a table created that looks like the following:
Unique Vendor Name | Total QTY Supplied |
---|---|
Vendor A | 9 |
Vendor B | 6 |
Vendor C | 7 |
Vendor D | 2 |
So far, I've created the distinct table of vendors by using LOAD DISTINCT [XXXX] from the source, but I am not sure how to handle getting the total QTY column generated from the original data set to tie into my distinct table.
Any help would be greatly appreciated!!!
Something like this might work for you
Load
VendorName,
Sum(qty) as TotalQTY
Group by VendorName;
Load distinct
VendorName,
Qty
From table
Something like this might work for you
Load
VendorName,
Sum(qty) as TotalQTY
Group by VendorName;
Load distinct
VendorName,
Qty
From table
can you just not create a visual table chart with vendor as the dimension and sum(quantity) as the expression?
This suited my needs perfectly, thanks!