Hi, Just wanted to ask if it is possible to combine GROUP BY, SORTBYCOLUMNS, DISTINCT and FILTER in a single statement.
Thank you!
Hi @TechNewbie
Technically, there's no reason why you can't combine all of those in a single statement.
If you're working with a remote data source like SharePoint/SQL Server, the resulting formula will most likely not be delegable. This means that with larger recordsets, the result may not include all your intended results.
Hi @timl, Thanks! Got it. So that is the caveat in using it all at once.
The data is stored in a SharePoint list.
I would like to filter the rooms. Remove all rooms that are already Occupied then show only available room timeslots for booking. Can you advise the best approach for my dilemma? Thank you!
Hi @TechNewbie ,
Could you please share a bit more about your scenario?
Do you want to show only available room timeslots for booking for a selected Room in your Gallery?
Do you add another list to list all avaialble timeslots records?
Further, could you please share more details about the formula you typed within the Rooms Gallery?
I assume that you add another list to list all available timeslots records for each ROOM, is it true? Based on the needs that you mentioned, please consider take a try with the following workaround:
Set the Items property of the Timeslots Gallery to following formula:
Filter( 'Your Timeslots List', Not(
Text(TimeslotsColumn) in Concat(Filter(RoomDetails, Room_Name = Gallery_SelectRoom_2.Selected.Result), StartTime & ";")
) )
Note: The TimeslotsColumn represents the column in your 'Your Timeslots List' to store the timeslots value, e.g. 7:00:00 AM, 7:30:00 AM, ... 3:00:00 PM, 3:30:00 PN, ...
Please consider take a try with above solution, check if the issue is solved.
Best regards,
Hi @TechNewbie
If I understand you correctly, I think you can accomplish this without needing to combine all of those functions into a single formula.
Using the screen layout that you already have, you can just filter your gallery controls and cross reference the other screen controls where appropriate.
From a high level, the approach would look something like this. Hope that makes sense.
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 |
---|---|
205 | |
70 | |
49 | |
48 | |
20 |
User | Count |
---|---|
252 | |
125 | |
84 | |
75 | |
73 |