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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 36 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |