Getting down to brass tacks, there are ‘Cost Centers’ from which an employee chooses while making an expense, like materials, labor payment, transport, foods and hotels etc etc. The cost centers are kept in a separate table, and is referenced into the expense table. There are certain cost centers which are used very often, like purchases and labor payments.
What I want is to automatically assemble the cost center list according to the frequency of the values that are being used. The most used ones are to be on the top. That makes it easier for people to choose from.
Is there any Appsheet way of doing it, rather than manually assembling and sorting every one of them?
Solved! Go to Solution.
Here’s again my brains wired up in the right direction after I posted the request:
COUNT(select(User expense submissions[Cost Center], [Cost Center]=[_THISROW].[Cost center Name]))
orderby(filter(“Cost Centers”, (IN(any(Profile Slice[Role]), [Available to:]))), [Count of cost centers], TRUE)
The IN() statement is to filter the availability of cost centers according to the user role.
N.B. Potential solution seekers, TRUE is necessary in the expression of orderby if you want to sort in descending order. Orderby orders the list in ascending order by default.
Here’s again my brains wired up in the right direction after I posted the request:
COUNT(select(User expense submissions[Cost Center], [Cost Center]=[_THISROW].[Cost center Name]))
orderby(filter(“Cost Centers”, (IN(any(Profile Slice[Role]), [Available to:]))), [Count of cost centers], TRUE)
The IN() statement is to filter the availability of cost centers according to the user role.
N.B. Potential solution seekers, TRUE is necessary in the expression of orderby if you want to sort in descending order. Orderby orders the list in ascending order by default.
Happens to me all the time.
Wow, I’ve thought the saying was “brass tax”… mind:blown
Assuming you have a system-generated [Related User expense submissions] column, this can be simplified to:
COUNT( [Related User expense submissions] )
Wow, thanks.
User | Count |
---|---|
43 | |
28 | |
24 | |
24 | |
13 |