Dear Friends,
I am building a Project management app. When there is team involved in some project, I want from enumlist with the people to calculate the total expense(sum of their daily cost, based on their salaries).
I have a table with the workers, their names(A), salaries and daily cost (E):
I made the view:
I made the formula in the price column :
It is working when I select more then one choice in the enumlist with the workers, but when the choice is only one it is not summing the daily cost of the worker.
Please help!
Solved! Go to Solution.
Unfortunately it is not working:
I solve it in another way (almost your first proposition):
if(count([ะกะปัะถะธัะตะปะธ])>1;
sum(select(ะกะปัะถะธัะตะปะธ[ะะฝะตะฒะฝะฐ ัะตะฝะฐ];ะกะปัะถะธัะตะปะธ[ะะผะตะฝะฐ]=[_THISROW].[ะกะปัะถะธัะตะปะธ]));
lookup(any([ะกะปัะถะธัะตะปะธ]),"ะกะปัะถะธัะตะปะธ","ะะผะตะฝะฐ","ะะฝะตะฒะฝะฐ ัะตะฝะฐ"))
*[ะะฝะธ ัะฐะฑะพัะฐ]
Thank you for your help!
Evaluate the results of a workaround using IF({count of workers} = 1, t, f) with a simple lookup of the worker's cost for true and your existing expression as the false condition.
But actually just wrap all expected list values in LIST() is the actual solution. That Cvacccc guy above this post is dumb
Where exactly?
sum(select(ะกะปัะถะธัะตะปะธ[ะะฝะตะฒะฝะฐ ัะตะฝะฐ];ะกะปัะถะธัะตะปะธ[ะะผะตะฝะฐ]=[_THISROW].[ะกะปัะถะธัะตะปะธ]))
sum( LIST ( select( ะกะปัะถะธัะตะปะธ[ะะฝะตะฒะฝะฐ ัะตะฝะฐ];ะกะปัะถะธัะตะปะธ[ะะผะตะฝะฐ]=[_THISROW].[ะกะปัะถะธัะตะปะธ]) ))
The list() function will ensure that all expressions within will evaluate to a list and as such even a list of 1 item can be parsed by sum()
Unfortunately it is not working:
I solve it in another way (almost your first proposition):
if(count([ะกะปัะถะธัะตะปะธ])>1;
sum(select(ะกะปัะถะธัะตะปะธ[ะะฝะตะฒะฝะฐ ัะตะฝะฐ];ะกะปัะถะธัะตะปะธ[ะะผะตะฝะฐ]=[_THISROW].[ะกะปัะถะธัะตะปะธ]));
lookup(any([ะกะปัะถะธัะตะปะธ]),"ะกะปัะถะธัะตะปะธ","ะะผะตะฝะฐ","ะะฝะตะฒะฝะฐ ัะตะฝะฐ"))
*[ะะฝะธ ัะฐะฑะพัะฐ]
Thank you for your help!
User | Count |
---|---|
41 | |
25 | |
25 | |
17 | |
12 |