Get First Result From Time-Series Request Without Using a Target Cell Range Literal

I am trying to retrieve the dates of upcoming earnings releases/earnings calls using the Excel Eikon add-in. Crucially, I only want to retrieve a single date - that is the date of the NEXT event. The following formula achieves this:
=TR("B3MSM28","TR.EventStartDate","Sdate=1D Edate=6M EventType=ECALL:RES", B2:B2)
(this retrieves earnings call/earnings release dates between tomorrow & 6M from now for 'Amadeus IT Group', returning the results in cell range B2:B2 - as of today 3 events fall within the 6 month window, and only 1 is returned by restricting the target cell range to size 1).
Result:
My Problem:
I am actually building excel reports using python, dumping Eikon add-in formulae into the excel as text strings. When I create the text string that will be inserted I do not know into which cell it will eventually written. Accordingly, I cannot specify a target cell range literal (highlighted bold) as above.
Attempted Solutions:
i. Simply omitting the target cell range doesn't work - I want it to return one value only:
=TR("B3MSM28","TR.EventStartDate","Sdate=1D Edate=6M EventType=ECALL:RES")
ii. I have tried defining a relative cell range via the excel name manager. My definition is:
THIS_CELL_RANGE : Refers to: =!A1:A1
I understand that this defines a relative cell range of size 1 that points at the cell itself. For example, the following excel built-in formula returns the width of whatever cell into which it is pasted: =CELL("width",THIS_CELL_RANGE)
But when I try this in my Eikon/Excel formula it doesn't work - it still returns three values:
=TR("B3MSM28","TR.EventStartDate","Sdate=1D Edate=6M EventType=ECALL:RES", THIS_CELL_RANGE)
Conclusion:
I hope my problem is clear. I've spoken with my in-house Refinitiv rep. and he has ruled out any solution that involves passing an additional parameter to the TR function (i.e. some special parameter that says 'return first result only'). I think I'm probably looking for some clever excel solution like my attempt ii. above, but I'm no excel whizz.
Best Answer
-
What if you try wrapping a parameter in a MIN() function?
=TR("B3MSM28","MIN(TR.EventStartDate)","Sdate=1D Edate=6M EventType=ECALL:RES",)
0
Answers
-
Wow @marcin.bunkowski - you nailed it! That's exactly what I'm looking for.
Are the 'helper functions' like MIN & others documented somewhere so that I can see what others are available?
0 -
Hi @pseudo-lycaena,
I just tried to modify the formula manually. In the Eikon Excel wizard you will not get any hint for that field as only a few functions are applicable.
However, if you are asking about 'helper functions' you may try e.g. with TR.PriceClose field and check the section "Quick Functions" where you would discover plenty of options how you can manipulate that field on the fly (see screenshot below).
For more guidance on Excel formulas please reach out to your local Refinitiv Helpdesk team.
0
Categories
- All Categories
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 33 Data Model Discovery
- 682 Datastream
- 1.4K DSS
- 613 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 248 ETA
- 552 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.8K Refinitiv Data Platform
- 625 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 191 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 83 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛