Forum Discussion
Get First and Last Values from Table
- 9 years ago
Hi there
Thanks for that what I did was the following solution which worked for me due to having using a Date Table, which ensured that I got the last actual value and first actual value.
Sales YOY - First Date = CALCULATE([Sales],FIRSTNONBLANK('Date'[Fiscal Year],'Sales Year on Year'[TSales]))
Sales YOY - Last Date = CALCULATE([Sales],LASTNONBLANK('Date'[Fiscal Year],'Sales Year on Year'[TSales]))
you can try with:
FirstDate-Value = CALCULATE(VALUES(Table1[Value]),FIRSTDATE(Table1[Date]))
LastDate-Value = CALCULATE(VALUES(Table1[Value]),LASTDATE(Table1[Date]))
Hi there
Thanks for that what I did was the following solution which worked for me due to having using a Date Table, which ensured that I got the last actual value and first actual value.
Sales YOY - First Date = CALCULATE([Sales],FIRSTNONBLANK('Date'[Fiscal Year],'Sales Year on Year'[TSales]))
Sales YOY - Last Date = CALCULATE([Sales],LASTNONBLANK('Date'[Fiscal Year],'Sales Year on Year'[TSales]))