Are you checking both MinVisit variable against Sum(Quantity) or should that be Sum(Transaction)??
((Sum(Quantity) >= $(MinVisit) and Sum(Transaction) < $(MaxVisit)) and (Sum(Quantity) >= $(MinQuantity) and Sum(Quantity) < $(MaxQuantity)))
, Quantity )
what exactly do you mean by this? Can you elaborate with an example?
"I want to calculate the mode of quantity--- mode(Quantity) but when I use the variables it should change appropriately"