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!View all the Fabric Data Days sessions on demand. View schedule
Hello All,
I am facing an issue while trying to calculate sales by category for updated date.Here i have data which is mentioned below
| Date | Category | Sales |
| 21-04-2021 | A1 | 250 |
| 22-04-2021 | A2 | 200 |
| 23-04-2021 | A3 | 100 |
| 24-04-2021 | A1 | 300 |
| 25-04-2021 | A4 | 200 |
| 25-04-2021 | A5 | 200 |
But the issue I am getting while displaying Sales for every Category but for Updated date, its taking sum of repeated Category for every date as mentioned below:-
| A1 | 550 |
| A2 | 200 |
| A3 | 100 |
| A4 | 200 |
| A5 | 200 |
Here it's taking sum of A1 for each date or both date i.e. (21-04-2021 & 24-04-2021). But it should take value only for Updated date i.e 24-04-2021 and the data should be like
| A1 | 300 |
| A2 | 200 |
| A3 | 100 |
| A4 | 200 |
| A5 | 200 |
Thanks in advance.
Give this a try.
Last Amount =
SUMX (
VALUES ( 'Table'[Category] ),
CALCULATE ( SUM ( 'Table'[Sales] ), LASTDATE ( 'Table'[Date] ) )
)
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!