cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
leung2019
Frequent Visitor

PowerApp Filter from source data

I created a PowerApp form ( pic 1, above) and want to filter data from the other source ( Sharepoint Online list) that is pulled in the PowerApp ( show pic 2, below one). Is there a way to filter data from the source ( real time pass the parameters, and group them by category required)? For example, if Date is selected as Dec 12, then Scada Time on Dec 12 would be filtered out. 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User
Super User

@leung2019 

It sounds like you are asking general questions about your app requirements.  I will respond here in general terms as well rather than attempt to solve the problems fully.

 

Can I filter data in the gallery with multiple filters?

Yes, you can.  It looks like you have a form and a gallery based on the same datasource.  You would use some code similar to this in the Items property of the gallery.  I will not write out the full solution because there are way too many fields here and alot of unknowns for me

Filter(
    your_datasource_name,
    IsBlank(DatePicker1.SelectedDate)=true Or Date = DatePicker1.SelectedDate,
    IsBlank(Dropdown_Location.Selected.Value)=true Or Location = Dropdown_Location.Selected.Value,
    IsEmpty(ComboBox_ShiftType.Selected)=true Or ShiftType = ComboBox.Selected.field_name,
    ...
    Deviation= Toggle_Deviation.Value
)

 

Can I do this in real-time?

What is meant by real-time?  Do you mean does the data change immediately in response to the FILTERs applied?  Then yes, it does.  Maybe you also mean can the data be REFRESHed at a regular interval to ensure the current data set?  Yes, you could use a countdown timer set to re-arm automatically and use a REFRESH function each time it ends.

 

Can I group data by category?

Yes, you can do this by using the SORT function on the category name.  Also put this code in the Items property like my previous example.

 

 

Given what I have seen here this looks like a better fit for Power BI.  I do not see any user interaction to alter the data in the datasource here so that's my recommendation.  Of course, I encourage you to do what you feel is best.  Good luck to you!

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

1 REPLY 1
mdevaney
Super User
Super User

@leung2019 

It sounds like you are asking general questions about your app requirements.  I will respond here in general terms as well rather than attempt to solve the problems fully.

 

Can I filter data in the gallery with multiple filters?

Yes, you can.  It looks like you have a form and a gallery based on the same datasource.  You would use some code similar to this in the Items property of the gallery.  I will not write out the full solution because there are way too many fields here and alot of unknowns for me

Filter(
    your_datasource_name,
    IsBlank(DatePicker1.SelectedDate)=true Or Date = DatePicker1.SelectedDate,
    IsBlank(Dropdown_Location.Selected.Value)=true Or Location = Dropdown_Location.Selected.Value,
    IsEmpty(ComboBox_ShiftType.Selected)=true Or ShiftType = ComboBox.Selected.field_name,
    ...
    Deviation= Toggle_Deviation.Value
)

 

Can I do this in real-time?

What is meant by real-time?  Do you mean does the data change immediately in response to the FILTERs applied?  Then yes, it does.  Maybe you also mean can the data be REFRESHed at a regular interval to ensure the current data set?  Yes, you could use a countdown timer set to re-arm automatically and use a REFRESH function each time it ends.

 

Can I group data by category?

Yes, you can do this by using the SORT function on the category name.  Also put this code in the Items property like my previous example.

 

 

Given what I have seen here this looks like a better fit for Power BI.  I do not see any user interaction to alter the data in the datasource here so that's my recommendation.  Of course, I encourage you to do what you feel is best.  Good luck to you!

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,508)