Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Solved! Go to Solution.
@amaan91 You have 3 choices. You can create your table and then use the lookup code in a calculated column for that table or you can adapt the code to use ADDCOLUMNS or you can simply extend your SUMMARIZE statement like this:
My Table = SUMMARIZE('Table', [column1], [column2], [column3], "__LastDate", MAX('Table'[the date column])
The
@amaan91 You have 3 choices. You can create your table and then use the lookup code in a calculated column for that table or you can adapt the code to use ADDCOLUMNS or you can simply extend your SUMMARIZE statement like this:
My Table = SUMMARIZE('Table', [column1], [column2], [column3], "__LastDate", MAX('Table'[the date column])
@amaan91 Maybe:
Measure =
VAR __Table = "My virtual table goes here"
VAR __LastDate = MAXX( __Table, [Date] )
VAR __SecondToLastDate = MAXX( FILTER( __Table, [Date] <> __LastDate ), [Date] )
RETURN
__SecondToLastDate
Hi @Greg_Deckler
I am trying to get this within a virtual table