and(ANY(SELECT(AOD[Salesperson ID], ([Email] = useremail())))=[SalesPerson],[Order Date]>=today()-12)
Above formula works perfect and shows each user all their orders.
However i need it to show their Splitsale too:: So at the end of the day, if the users name pops up in either field as [salesperson] or [splitsale], then i need that user to have access to it.
[Salesperson], [Splitsale] : Both are fields in Orders Table that chooses reps name.
I wrote it several ways but doesnt seem to work. Any ideas
Solved! Go to Solution.
AND(
([Order Date] >= (TODAY() - 12)),
ISNOTBLANK(
INTERSECT(
LIST(
[Salesperson],
[SplitSale]
),
SELECT(
AOD[Salesperson ID],
(USEREMAIL() = [Email])
)
)
)
)
Hi @Rurrea
Have you tried using OR() ?
Tried the โorโ option but it misreads it
No, youโre misusing it.
Or(and(ANY(SELECT(AOD[Salesperson ID], ([Email] = useremail())))=[SalesPerson], and(ANY(SELECT(AOD[Salesperson ID], ([Email] = useremail())))=[Splitsale]),[Order Date]>=today()-12)
Tried something like this but it misreads it and just ends up filtering all orders 12 days back for everyone
What Iโm I doing wrong or what would u do? Would love to figure this out tonight
Your logic is wrong, the general syntax should be
AND(
date comparison ,
OR(
[salesperson] comparison ,
[splitsale] comparison
)
)
And([Order Date]>=today()-12,or(ANY(SELECT(AOD[Salesperson ID], ([Email] = useremail())))=[SalesPerson], ANY(SELECT(AOD[Salesperson ID], ([Email] = useremail())))=[splitsale]))
Solution still didnโt work. Unless Iโm doing it wrong
AND(
([Order Date] >= (TODAY() - 12)),
ISNOTBLANK(
INTERSECT(
LIST(
[Salesperson],
[SplitSale]
),
SELECT(
AOD[Salesperson ID],
(USEREMAIL() = [Email])
)
)
)
)
Worked perfectly
User | Count |
---|---|
16 | |
11 | |
9 | |
8 | |
4 |