I've been struggling with the following thing (I thought it would be super easy...but nope):
I am using a SQL database and have multiple tables. In one of my screen I have 5+ filters and 3 filters are from 1 table and the two other tables are from different tables. For example
Filter 1 = ContractID from the table "Contracts"
Filter 2 = ContractType from the table "Contracts"
Filter 3 = Country from the table "Countries"
Filter 4 = Currency from the table "Currencies"
All my tables are related to my "Contracts" table, thus Contracts being the fact table and the other ones being the dimension tables.
How can I filter a datacard in PowerApps based on multiple filters from different tables within the SQL database?
In Power BI it is super easy, just add your filters and drag the values from the tables in it and DONE, but in PowerApps this seems to be a nightmare...?
I watched a video from Shane Young https://www.youtube.com/watch?v=kLGglidmPxg and reading the comments it seems to be a chaos if you try to use more than 2 filters.... what the hell, seriously?
Hope someone could give me a hand, thanks in advance!
I have apps with banks of as many as 10 filters that work just fine together with lightning fast results. However, when I am using multiple data sources, I have always had to store the combined data in a collection when I initially load the data, and then I can filter against the consolidated collection as a single data source.
Hi @LRVinNC that's nice to hear. Do you mean different tables? Because I am using one data source which is SQL Server (1 database), but the database has multiple tables.
Do you have an example of such a code perhaps?
That's what I mean by multiple data sources. Each table IS a separate data source. They just happen to use the same SQL connection.
Look at using Collect to save the results in a collection and Add Columns to append additional data from the second table via a Lookup.
AddColumns: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-table-shaping (there is a very good example in here of the two used together)
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.