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 |
---|---|
17 | |
14 | |
10 | |
7 | |
4 |