I don't get the point of using When Ordered by Fie...
# general
l
I don't get the point of using When Ordered by Field on saved searches. Example: SA 37463 Why do I need the When Ordered By Field?
d
V. useful for doing summary saved searches For quick example, you could have a summary search showing the most recent transaction and its amount (if you didn't use "When Ordered By Field", you would get the amount of the highest value order)
Copy code
┌────────┬──────────────┬───────────────────────┐
│ FIELD  │ SUMMARY TYPE │ WHEN ORDERED BY FIELD │
├────────┼──────────────┼───────────────────────┤
│ Date   │ Maximum      │                       │
│ Amount │ Maximum      │ Date                  │
└────────┴──────────────┴───────────────────────┘
l
If I don't have the When Ordered By Field, then the Amount field will prevail over the Date field? Is there a hard rule on this? Why is that the case? Thank you!
m
Without a "When Ordered By",
MAX({amount})
will give you the highest amount in the group. Using When Ordered By instead will give you the amount of the result with the latest date - i.e amount for the result matching
MAX({date})
.
l
Thanks everyone. Here are the results of my testing based on your example. DATE field MAXIMUM (no when ordered by field) AMOUNT field MAXIMUM (no when ordered by field) Outcome: returns the Max of Date and Max of Amount independently (no correlation) Both of you were right based on @David B's example. I tried this one though. I expected to get the date of the highest amount and the highest amount itself as well. Instead, I got the highest amount with a random date I couldn't trace. DATE field MAXIMUM (when ordered by field = AMOUNT) AMOUNT field MAXIMUM (no when ordered by field) Is this really the expected behavior? Thanks!
d
Hmmm, that's interesting. I couldn't replicate with any transactions in my account Can think of a couple of potential reasons: • Slightly different
amount
fields (i.e. "Amount (Net)" vs "Amount") • If you're operating with OneWorld, maybe the amounts are in a different currency? Best thing to do would be to add some more fields (with
when ordered by field = Amount
) so you can see which transaction/data the amount relates to
If you're still having no luck, maybe post/DM through a screenshot of your search setup