Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a straight table with 5 different columns showing 5 different supplier prices for items we sell, with a column with the items SKU. See table below
Item SKU | Supplier 1 Price | Supplier 2 Price | Supplier 3 Price | Supplier 4 Price | Supplier 5 Price |
F001709-5G | 17.29 | 45.2 | 17.29 | 11.4 | - |
F001709-10G | 30.94 | 90.4 | 30.94 | 50.4 | - |
F003977-1G | - | - | 41.86 | 32.2 | 29.99 |
I'm going to use
RangeMin([Supplier 1 Price], [Supplier 2 Price], [Supplier 3 Price], [Supplier 4 Price], [Supplier 5 Price])
to add another column (Cheapest Price) showing the cheapest price for a SKU. But I then need another column showing which Supplier is the cheapest for that SKU and I'm not sure what is the best way to do this. See table below.
Item SKU | Supplier 1 Price | Supplier 2 Price | Supplier 3 Price | Supplier 4 Price | Supplier 5 Price | Cheapest Price | Cheapest Supplier |
F001709-5G | 17.29 | 45.2 | 17.29 | 11.4 | - | 11.4 | Supplier 4 |
F001709-10G | 30.94 | 90.4 | 31.25 | 50.4 | - | 30.94 | Supplier 1 |
F003977-1G | - | - | 41.86 | 32.2 | 29.99 | 29.99 | Supplier 5 |
F003977-5G | 160.16 | 99.6 | 141.96 | 109.2 | - | 99.6 | Supplier 2 |
If anybody can suggest how I can display the Cheapest Supplier column on the right it would be much appreciated.
Thanks
Paul
hi,
Do you have date column in your model you can use firstsortedvalue to achieve this
Sum(Aggr(FirstSortedValue(Price, Date), Vendor_id))
or
Last value: FirstSortedValue(Price, -Date)
First value: FirstSortedValue(Price, Date)
try some thing like this.
Vikas
Hi Vikas
I don't have a date column, I only have the prices from each supplier.
37 Suppliers in total and I need to find the cheapest supplier for nearly 1.5 million items from those suppliers.
Kind Regards
Paul