Ok, first I have to say thank you to everyone that has helped. I have taken way more then I have given in this community, and I really appreciate it.
Now onto the problem. Iโm trying to create something similar to a sumifs function by using a Sum function with a select function, but Iโm failing miserably. Here is the function that I have, but itโs not returning anything.
sum(
select(
employee ledger[employee pay],
and(
[_thisrow].[eid]=any(employee ledger[EID]),
or(
any(employee ledger[activity])=โAM Dailyโ,
any(employee ledger[activity])=โPM Dailyโ))))
Hi @School_Bus
What happens in the expression tester with this expression?
Do the parts work if you break it down?
When I test the expression I donโt get any responses for any record.
I tried running just the select function, and I get no responses for any of my records. So I know itโs a problem with my select function, but Iโm lost on the problem. Admittedly I am just learning how to use Select, and itโs kicking my butt.
What are you trying to accomplish with your SUMIF()?
Iโm trying to create a sumifs for payroll. I figured it out, it was the first condition after the and function that was binding my expression. Looks like itโs up and running now.
thank you
So I tried to add a function in to filter using the date, but it really just returns everything. Can you tell me whatโs wrong with my function? I suspect itโs the any() function causing me issues, but I donโt know how to get the expression to work. Thanks in advance
Sum(
select(
employee ledger[driver cost],
and(
[_thisrow].[eid]=[eid],
any(company payroll[w1start])<=[date],
any(company payroll[w1end])>=[date],
any([activity])=โTripโ
)))
Have you read this?
All of it?
Yep, I got that it returns just one arbitrary value, but the table Iโm pulling from only has a single record. I figured by using Any() I would just be left with that value from the single record. I donโt know what to do with this, and why itโs returning all instances where activity = trip. I just tried removing the any function from [activity]=โTripโ since itโs comparing a list to a value.
So when I used the ANY function it was an attempt to overcome the problem where list <> value in the select function. I think this is caused by me using a table to column function โcompany payroll[w1start]โ
It looks like a similar question has come up in the past that you were in the conversation on, but it doesnโt look resolved. Since ANY() is just returning an arbitrary number in the list, how should I go about resolving the conflict where a value cannot be compared with a list?
Iโve linked the previous discussion thread for reference. Thanks in advance for the help
I think itโs resolved now. I am trying to use a filter table for the dashboard with this, and that means I had to reference two separate tables in the same select function. Soโฆ I created virtual columns for my w1start, w1end, etcโฆ in this sheet that used a lookup to get the value from my filter table. Then I went back to my select function and removed that external table reference and was able to fix my search function that way. At least I think, Iโll have to try to break it tomorrow, but it looks like it works now
User | Count |
---|---|
43 | |
32 | |
25 | |
23 | |
14 |