Dear community,
I'm stumped - here's the situation:
Now, I want to accumulate sales based on a variable number of PEOPLE which is unordered
I've tried:
I'm stumped--so, how do I accumulate sales that occurred on a date and has an unsorted row of n-number of people
e.g.,
Jason, 20
Mike, 17
Jason, 2
David, 11
Jason, 7
David, 9
How do I accumulate by person if I don't know the names, number of names or number of records?
Best, Jason
Solved! Go to Solution.
Hi @wiredupjax :
Do you want to summarize "number" based on "Name"?
If so please try this solution:
1\My excel tabel
2\My flow
Entirety
Detail1
Reference Expression
1\
outputs('List_rows_present_in_a_table')?['body/value']
2\
item()?['Name']
Note:Get the list of names through the select action
3\
union(body('Select'),body('Select'))
Note:Delete duplicates in name list
4\
{
"type": "array",
"items": {
"type": "object",
"properties": {
"Name": {
"type": "string"
}
},
"required": [
"Name"
]
}
}
Note:Analyze the list through JSON action
Two variables
Note:Add two variables
Detail2
Note:
Traverse the data source while traversing the name list (nested), and summarize the numbers of all records with the same name.
Reference Expression
5\
int(items('Apply_to_each_2')?['number'])
Note:Because number is a string, use int to convert it to a number for calculation
Detail 3
Note:The result is saved to the variable "TheResult"
The Result
Best Regards,
Bof
Hi @wiredupjax :
Do you want to summarize "number" based on "Name"?
If so please try this solution:
1\My excel tabel
2\My flow
Entirety
Detail1
Reference Expression
1\
outputs('List_rows_present_in_a_table')?['body/value']
2\
item()?['Name']
Note:Get the list of names through the select action
3\
union(body('Select'),body('Select'))
Note:Delete duplicates in name list
4\
{
"type": "array",
"items": {
"type": "object",
"properties": {
"Name": {
"type": "string"
}
},
"required": [
"Name"
]
}
}
Note:Analyze the list through JSON action
Two variables
Note:Add two variables
Detail2
Note:
Traverse the data source while traversing the name list (nested), and summarize the numbers of all records with the same name.
Reference Expression
5\
int(items('Apply_to_each_2')?['number'])
Note:Because number is a string, use int to convert it to a number for calculation
Detail 3
Note:The result is saved to the variable "TheResult"
The Result
Best Regards,
Bof
@v-bofeng-msft - thank you for the example.
Can you explain the logic behind the flow?
As in,
1st you want to x
2nd you'll want to y
3rd ... n
This way rather than simply copying your solution, I can learn why.
Best, JS
I don't understand what you are trying to do. Can you at least provide the CSV schema? And why are you talking about dates when there are no dates in the list example you provided? Also, you keep writing 'sorted'. Fine. But sorted by what? Sorted by date, location, name, or total amount of sales?
If you know SQL, could you state what you want as a SQL statement? That way it'll be a lot clearer what you're after.
Hi @wiredupjax :
I have added some notes to the original reply, hope they are useful to you.
Best Regards,
Bof
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
User | Count |
---|---|
76 | |
20 | |
17 | |
14 | |
13 |
User | Count |
---|---|
128 | |
35 | |
29 | |
28 | |
25 |