Hi,
Iโm new here and, and just finished my first App with one unsolved issue, and need your help please.
I have 3 tables in my App and each has many columns, but Iโll mention the required columns only
1st, Salesmen, (Name, Email)
2nd, Clients, (Client ID, Salesman, Status)
3rd, Actions, (Client ID)
What I need is a Slice to show the last Action of each of my clients only that donโt have Status โNot Interestedโ or โOrderedโ
Ex: Each client may has more than one action, sorted by date, so I need to show the last action only, for those clients that assigned to me and donโt have Status โNot Interestedโ or โOrderedโ
I used this expression and it worked but I need the last row only if all condition are true
1st, (Check my Clients) LOOKUP(USEREMAIL(), โPartnersโ, โEmailโ, โNameโ)=LOOKUP([Client ID], โClientsโ, โClient IDโ, โSalesmanโ)
2nd, (Same 1st, but only if their Status are not โNot Interestedโ or โOrderedโ)
3rd, (Show me the Last Row of the clients that meets the above conditions)
Thanks in advanced
Solved! Go to Solution.
Try this:
AND(
NOT(IN([Status], LIST("Not Interested", "Ordered"))),
(USEREMAIL() = [Client ID].[Salesman].[Email]),
(
[_ROWNUMBER]
= MAX(
SELECT(
Actions[_ROWNUMBER],
AND(
NOT(IN([Status], LIST("Not Interested", "Ordered"))),
([_THISROW].[Client ID] = [Client ID])
)
)
)
)
)
See also:
Youโll Need to use MAX() to find either the highest [_RowNumber] or [DateTime]
Thank you Simon, but my problem is that Iโm not able to combine all the expressions together, I tried several ways but still didnโt get the correct one
Do you need to see this in the Salesman record or the Client record?
In my Action table, I have added many actions for each client, so I need a slice to show me only the last action of this client just incase it match the following conditions
1- If this is my client LOOKUP(USEREMAIL(), โPartnersโ, โEmailโ, โNameโ)=LOOKUP([Client ID], โClientsโ, โClient IDโ, โSalesmanโ)
2-If the Status of this client is not โNot Interestedโ or not โOrderedโ
Any help please?
Try this:
AND(
NOT(IN([Status], LIST("Not Interested", "Ordered"))),
(USEREMAIL() = [Client ID].[Salesman].[Email]),
(
[_ROWNUMBER]
= MAX(
SELECT(
Actions[_ROWNUMBER],
AND(
NOT(IN([Status], LIST("Not Interested", "Ordered"))),
([_THISROW].[Client ID] = [Client ID])
)
)
)
)
)
See also:
Thank you so much, this is exactly what I need
User | Count |
---|---|
43 | |
30 | |
24 | |
23 | |
13 |