How can I group my line table to show the values grouped by month, but filtered by user logged in
I have a PowerApp for Medical Service, they want to see in the app the number of visits that an employee has had during the year
I made this sample but the values are not grouped and I cannot filter by employee number
I have a colum that get the Month and another that add a 1 each time a form is submited this is how I track number of visits
when the employee log-in in the app he has to use his employee number
Solved! Go to Solution.
Hi@EC_1,
Based on the issue that you mentioned, do you want to GroupBy the Month and Visitor based on the employee number?
Could you please share a bit more about the your data source?
I have a test on my side, a SP list named 'AMedE', 'Month', 'Mes_Visit', 'ENumber' are all Text columns.
I am not sure how you determine your employee number, in my scenario, I just assign it a simple code.
Create an app generated directly based on the SP list 'AMedE' so that I get three screens:
Browse Screen with a Gallery to display all the data
Detail Screen with a Display Form to display detailed information
Edit Screen with an Edit Form to create/edit data and submit data
I just set the Default property of the TextInput corresponding to the 'Mes_Visit' as "1".
1). Add a Dropdown
set Items property:
Distinct(AMedE,ENumber)
set OnChange property:
ClearCollect(
AME,
AddColumns(
GroupBy(
Filter(AMedE,ENumber = Dropdown1.Selected.Result),
"Month","GMonth"),
"VisitN",CountRows(GMonth))
)
2). Inset a Line chart and set the Items property:
AME
Regards,
Qi
Hi@EC_1,
Based on the issue that you mentioned, do you want to GroupBy the Month and Visitor based on the employee number?
Could you please share a bit more about the your data source?
I have a test on my side, a SP list named 'AMedE', 'Month', 'Mes_Visit', 'ENumber' are all Text columns.
I am not sure how you determine your employee number, in my scenario, I just assign it a simple code.
Create an app generated directly based on the SP list 'AMedE' so that I get three screens:
Browse Screen with a Gallery to display all the data
Detail Screen with a Display Form to display detailed information
Edit Screen with an Edit Form to create/edit data and submit data
I just set the Default property of the TextInput corresponding to the 'Mes_Visit' as "1".
1). Add a Dropdown
set Items property:
Distinct(AMedE,ENumber)
set OnChange property:
ClearCollect(
AME,
AddColumns(
GroupBy(
Filter(AMedE,ENumber = Dropdown1.Selected.Result),
"Month","GMonth"),
"VisitN",CountRows(GMonth))
)
2). Inset a Line chart and set the Items property:
AME
Regards,
Qi
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
187 | |
66 | |
45 | |
42 | |
20 |
User | Count |
---|---|
246 | |
120 | |
83 | |
74 | |
69 |