Hi all,
I have a problem to pass a label value to a formula which should fetch data from a table.
I am a beginner with this, I have watched most videos of Shane Young on Youtube already, but I might have missed the solution.
I have 2 data tables which come from Excel (although I have also used a collection of this):
First table is about maximum capacity of an office (named OfficeCapacity).
Office OfficeName MaxCapacity __PowerAppsId__
| OfficeA | Office A | 22 | snEyZtrOUIE |
| OfficeB | Office B | 19 | WUOwbNaZ8XY |
| OfficeC | Office C | 13 | EpvrPLaARk0 |
| OfficeD | Office D | 8 | socqZWa5d2M |
Second table: This is a time table mentioning occupancies of these offices (named MonthlyData)
MonthColumn OfficeA OfficeB OfficeC OfficeD __PowerAppsId__
| 01/01/2020 23:00 | 10 | 9 | 8 | 6 | RWEpesdUZ_8 |
| 01/03/2020 23:00 | 11 | 12 | 10 | 5 | 91HFLnvikDA |
| 01/05/2020 22:00 | 12 | 10 | 10 | 5 | _uqSaDZBCOE |
| 01/04/2020 22:00 | 10 | 5 | 11 | 4 | rkzX-jn_F8o |
In a vertical gallery I have mentioned
OfficeName (Label4) and MaxCapacity (Label5) - and this works for those 4 offices (linked to
Now I would like to add extra labels in each card which the latest occupancy is mentioned. Therefore I would like to link the already present labels to the query I make for the second table:
I used following expression to populate Label6 at the text-value:
First(SortByColumns(MonthlyData,"MonthColumn",Descending)).OfficeA
This works and it shows the right number
Naturally I get this same result in all 4 datacards, which is not how I would want it.
I would like to have this dynamic, depending on the current item in this datacard
When I try the expression:
First(SortByColumns(MonthlyData,"MonthColumn",Descending)).Label4 - it doesn't work
Neither does
First(SortByColumns(MonthlyData,"MonthColumn",Descending)).Text(Label4)
Neither does
First(SortByColumns(MonthlyData,"MonthColumn",Descending)).ThisItem
Neither does
First(SortByColumns(MonthlyData,"MonthColumn",Descending)).ThisItem.Office
The solution is probably easy, but I am really stuck here.
Thanks for helping me out.