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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I know this has to be super easy, I just can't think of a solution:
I have a simple table, just a dales and a sales amount, on my page i have a date slices, where the user can only select MYD, YTD, Previous Year like so:
My data looks like this:
| Report Date | Actual Sales Year to Date |
| 2022-02-14 | 3.8589 |
| 2021-12-31 | 17.6209 |
| 2020-12-31 | 19.9421 |
How can I get just the Sales Amount (no addition, no max, just the number on that row) for the latest date on the period? In other words, If the user selects "2021", I'd like to show the sales amount recorded for "2021-12-31" (17.6209), If the user selects "YTD", I wans just the lastest recorded amount for the lastest date in the year (3.8589). Thanks in advance.
Solved! Go to Solution.
@jo_at_price , Last value of the year by date
calculate(lastnonblankvalue('Table'[Report Date], sum(Table[Actual Sales])) , Datesytd('Date'[Date]))
this can work for a selected duration
calculate(lastnonblankvalue('Table'[Report Date], sum(Table[Actual Sales])) )
Make sure you are using date table for time intelligence
@jo_at_price , Last value of the year by date
calculate(lastnonblankvalue('Table'[Report Date], sum(Table[Actual Sales])) , Datesytd('Date'[Date]))
this can work for a selected duration
calculate(lastnonblankvalue('Table'[Report Date], sum(Table[Actual Sales])) )
Make sure you are using date table for time intelligence
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!