I have a mdoels table: tableM, and an inventory table: tableT, i want to loop through my models table, tableM, and count how many of each model in tableM exsist in invnetory, tableT. I want to output the count into a collection if possible.
All tables are from a SQL database, and i wish i could write queries to do this, but i can not with powerapps 😞
I do not want to hard code the models and the countif functions because we are always adding and deleting models.
My resulting count collection should just be two columns like this
One way to achieve that is though using a gallery to visualise your results and countrows() to calculate the number of model occurences (keep in mind though that the countrows() function is not delegatable to any data sources, which means that if you have more than 500 models for a specific type of model e.g. 550 ModelA models, then the countrows function will only return 500):
This solution will not load your table into a collection:
1. Create a gallery and set its Items property to tableM datasource
2. Insert a text box into the gallery and set its Text property to tableM.ModelName
3. Insert another text box to calculate the count, set its Text property as