Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
4 replies
Subscribers
8 subscribers
Views
1713 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
I have a group of items that's being created in a rule and its format is lik
aswinb
over 10 years ago
I have a group of items that's being created in a rule and its format is like this:
[month = 3, year = 2013, number = 1],
[month = 3, year = 2013, number = 1],
[month = 3, year = 2013, number = 1],
[month = 3, year = 2014, number = 1],
[month = 3, year = 2014, number = 1],
[month = 4, year = 2014, number = 1],
[month = 4, year = 2014, number = 1]
I would like to get the count of the field 'number' that were created in the same month and same year. For instance if the month = 3 and year = 2014, I would like to get the count of the 'number' field for those dates. Any help would be deeply appreciated.
thanks...
OriginalPostID-106459
OriginalPostID-106459
Discussion posts and replies are publicly visible
Parents
0
jesse.triplett
Appian Employee
over 10 years ago
If you're looking for a specific month and year you can use wherecontains.
EG You could return the indices that match the year of interest, the indices that match the month of interest and intersect them, and count the result. Alternatively you could do it one line like below.
count(wherecontains(monthOfInterest,touniformstring(index(items,wherecontains(yearOfInterest,touniformstring(items.year))).month)))
If you're looking to do this dynamically for all combinations of unique month/year, you'll have to make some expression rules and apply over them, but the same principles apply.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
jesse.triplett
Appian Employee
over 10 years ago
If you're looking for a specific month and year you can use wherecontains.
EG You could return the indices that match the year of interest, the indices that match the month of interest and intersect them, and count the result. Alternatively you could do it one line like below.
count(wherecontains(monthOfInterest,touniformstring(index(items,wherecontains(yearOfInterest,touniformstring(items.year))).month)))
If you're looking to do this dynamically for all combinations of unique month/year, you'll have to make some expression rules and apply over them, but the same principles apply.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data