Hi guys, I was hoping someone might be able to ass...
# general
i
Hi guys, I was hoping someone might be able to assist me with a saved search I am doing. I am trying to compare vendor purchase price and then have it tell me which one listed is the preferred vendor. The problem is with my current formulas, when I run the results it only gives me the vendor price for which one is set to the preferred vendor. I want it to tell me the price that is listed for vendor 1 , vendor 2, and vendor 3, and then a column that says which is currently set as the preferred. Currently, it gives me a zero for the price for that vendor if it is not set as the preferred and only displays the preferred pricing.
g
I believe {vendor} is used for preferred vendors only. {othervendor} seems to be the non-preferred.
i
I'll give that a shot, thank you
Hm, nope that didn't do it either.
a
What do you have in your criteria? If I do an item search with no criteria other than to filter on one item, and i show the vendor, vendor code, and price, I do see different vendors in the vendor column for each line
i see in the formula {vendor} only returns preferred as Gregory mentioned, and othervendor does work for me (again, simple, no cases or summary, just to show what the vendor and othervendor field is)
i
message has been deleted
Then it's listing the item twice and putting the preferred vendor price in for each vendor when I want it to display the actual vendor price in each column not just the preferred.
g
Are you still running formulas in those results?
I was messing about and found this to work: case when (({vendor} != {othervendor}) AND ({othervendor} = 'xxxx')) then {vendorcost} else 0 end
where xxxx can be replaced with the vendord that your column. Also, in order to get a one line result, I had to group/sum results columns.
i
I'll give it a shot
g
the {vendor} != {othervendor} part of the formula is to identify those that aren't the preferred vendor.
i
Still not giving me both vendor prices when I did this:
results came back like this
message has been deleted
g
I see, I had some differences in my saved search. case when {othervendor} = 'xxxx' then {vendorcost} else 0 end should display the cost. My original would only display the cost if the vendor was not the preferred. but looking at your results, you have a column to show the preferred, and my guess is you'll just reference the appropriate column to find the preferred price.
i
Ah ha! It worked!
👍🏻 1
Do you know of a way to get it all display on the same line? Right now if there are two prices it is splitting it up into two line items on the report.
message has been deleted
g
Try the following summaries: Name: Group, Display Name: Group, COO: Group, Essendant Purchase Price: Maximum, Supplies Purchase Price: Maximum, SP Richards Purchase Price: Maximum, preferred vendor: group
I'm not sure which summary value would work for the vendor code, since you have N/A and a mix of numbers and text. If you removed the N/A, then Group or maximum would probably work.
i
That worked beautifully. Thank you so much for all your help Gregory.
g
So glad to hear! Happy to have helped!