Hello everyone,
I have two table: Table A for registering new water ponds, and Table B which registers water level over time for different ponds.
I need the Deck view for Table A to show a VC with the last water level registry.
So I can see at a glance whatยดs the water level of that particular waterpond.
The two problems Iยดm facing:
I solved problem #1 with this formula:
LOOKUP( MAX(Table B[_ROWNUMBER]), โTable Bโ, โ_ROWNUMBERโ, โWaterLevelโ )
This way its showing the last โWaterLevelโ for all ponds.
Im still missing the condition so that the โPondsโ match between โTable Aโ and โTable Bโ. Any ideas on how to add this?
Thanks for reading!
Solved! Go to Solution.
Try:
ANY(
SELECT(
Table B[WaterLevel],
(
[_ROWNUMBER]
= MAX(
SELECT(
Table B[_ROWNUMBER],
([Pond] = [_THISROW].[Pond])
)
)
)
)
)
SELECT(Table B[_ROWNUMBER], ([Pond] = [_THISROW].[Pond]))
gets a list of row numbers for all rows in Table B wherein the Pond column value matches the Pond column value of this (Table A) row.
MAX(...)
gets the largest of the row numbers from (1).
SELECT(Table B[WaterLevel], ([_ROWNUMBER] = MAX(...)))
returns a list of the one WaterLevel column value from the one row in Table B having the _ROWNUMBER column value matching the one found by (2).
ANY(...)
converts the list of one value given by (3) into a singular value.
Try:
ANY(
SELECT(
Table B[WaterLevel],
(
[_ROWNUMBER]
= MAX(
SELECT(
Table B[_ROWNUMBER],
([Pond] = [_THISROW].[Pond])
)
)
)
)
)
SELECT(Table B[_ROWNUMBER], ([Pond] = [_THISROW].[Pond]))
gets a list of row numbers for all rows in Table B wherein the Pond column value matches the Pond column value of this (Table A) row.
MAX(...)
gets the largest of the row numbers from (1).
SELECT(Table B[WaterLevel], ([_ROWNUMBER] = MAX(...)))
returns a list of the one WaterLevel column value from the one row in Table B having the _ROWNUMBER column value matching the one found by (2).
ANY(...)
converts the list of one value given by (3) into a singular value.
Worked perfectly!
Once more you nailed it!
Iยดve been going around this for days.
Thanks @Steve !
User | Count |
---|---|
18 | |
15 | |
10 | |
7 | |
4 |