I have a table with distances between customers to stores, and I want to show only the minimum distances (to create a view of the closest store for a specific customer(zipcode).
I calculated the distance using the distance function in miles, and I tried using an IF sentence to select the minimum values but it didn't work.
Does anybody has done something similar?
thanks!
Hi @Claudia Ramirez
I don't know what your data looks like but a simple IF statement
with an LOD calculation should work.
1) For "Nearest Store Address" for each [Zipcode] use
IF [Distance] = { Fixed [Zipcode] : MIN ( [Distance] ) }
Then [Address]
END
Also I see your crosstab displaying the Customer Zipcodes as columns,
it would help to transpose it so that they are in Rows and you should get
[Zipcode], MIN([Distance])
35004, 11.7
35005, 13.8
35006, 22.4
35007, 17.3
I hope this gets you the right answer. Take care and Best wishes !
Sincerely,
Soumitra