Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
I was wondering if someone would help me with the following.
I have a table that has got Dates and the Amount.
What I want to return is the first and last date, with the corresponding (or associated) amount. This could potentially be the first and last values, instead of the dates.
I know that you can potentially do this with the filters, but it is taking a really long time to run.
thanks
Solved! Go to Solution.
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]))
Hi @GilbertQ
I suppose that your dataset contains large data which makes it spend much time to filter. But it seems that using filter to fetch the records corresponding to the first and last date is the only option currently. Based on my research, I cannot find any solution to improve the performance of running filter.
I think you can create a calculate table that contains only the first and last date with the corresponding amount like a cache so that you don't need to run the filter each time.
Best regards,
Yuliana Gu
Hi there
thanks for that I will see what i can do.
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]))
Filter seems the only option as you need to get the first/last date and then use filter to get the amount for that specific date.
Thanks, I was hoping for a solution with a function!
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 22 | |
| 22 | |
| 18 | |
| 17 | |
| 13 |
| User | Count |
|---|---|
| 61 | |
| 52 | |
| 47 | |
| 41 | |
| 38 |