The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
User | Count |
---|---|
11 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
23 | |
14 | |
13 | |
10 | |
8 |