Forum Discussion
krishnak
6 years agoNew Member
Look up value help needed
Hi All, I am a beginner and working on a visual. The problem is best illustrated by the following table. Date Value Required Avg Value 4/1/2019 342 Avg of 342, 298 3/1/2019 354 Avg of...
- 6 years ago
Hello krishnak ,
You may try this:
Answer = VAR _YearStart = LOOKUPVALUE ( Sheet2[Value], Sheet2[Date], DATE ( YEAR ( Sheet2[Date] ), 1, 1 ) ) VAR _Current = Sheet2[Value] VAR _Avg = DIVIDE ( _YearStart + _Current, 2 ) RETURN _AvgResult
Cheers!
Vivek
If it helps, please mark it as a solution
Kudos would be a cherry on the top 🙂 (Hit the thumbs up button!)
If it doesn't, then please share a sample data along with the expected results (preferably an excel file and not an image)
https://www.vivran.in/
Connect on LinkedIn
vivran22
Community Champion
6 years agoHello krishnak ,
You may try this:
Answer =
VAR _YearStart =
LOOKUPVALUE (
Sheet2[Value],
Sheet2[Date], DATE ( YEAR ( Sheet2[Date] ), 1, 1 )
)
VAR _Current = Sheet2[Value]
VAR _Avg =
DIVIDE ( _YearStart + _Current, 2 )
RETURN
_Avg
Result
Cheers!
Vivek
If it helps, please mark it as a solution
Kudos would be a cherry on the top 🙂 (Hit the thumbs up button!)
If it doesn't, then please share a sample data along with the expected results (preferably an excel file and not an image)
https://www.vivran.in/
Connect on LinkedIn