Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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] ) )
)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.