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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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] ) )
)