Forum Discussion
KalyanPrasad
Aug 19, 2024Copper Contributor
I need to return a value corresponding to date
Hello, my input data says this. Before 01-August, the administration of City 1 was overseen & supported by State 1 After 10th-August, City 1 was supported by State2, and from date 20th-...
- Aug 19, 2024
As variant
=INDEX( XLOOKUP([@Date], 1*DROP(Source[#Headers],,1),DROP(Source,,1),,-1), XMATCH([@City],Source[City] ) )
HansVogelaar
Aug 19, 2024MVP
Try
=INDEX(Table1[[2024-08-01]:[2024-08-20]], XMATCH([@City], Table1[City]), XMATCH([@Date], DATEVALUE(Table1[[#Headers],[2024-08-01]:[2024-08-20]]), -1))
- KalyanPrasadAug 19, 2024Copper Contributornot working. thanks for trying.
- HansVogelaarAug 19, 2024MVP
You have to use the names of the columns in your table:
=INDEX(Table1[[01-Aug-24]:[20-Aug-24]], XMATCH([@City], Table1[City]), XMATCH([@Date], DATEVALUE(Table1[[#Headers],[01-Aug-24]:[20-Aug-24]]), -1))