Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
jay_patel
Helper IV
Helper IV

How to Get Categorical Data for Maximum Date to neglect Duplicacy.

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 CategorySales
21-04-2021A1250
22-04-2021A2200
23-04-2021A3100
24-04-2021A1300
25-04-2021A4200
25-04-2021A5200

 

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:-

A1550
A2200
A3100
A4200
A5200

 

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

A1300
A2200
A3100
A4200
A5200

 

 

Thanks in advance.  

1 REPLY 1
jdbuchanan71
Super User
Super User

@jay_patel 

Give this a try.

 

Last Amount =
SUMX (
    VALUES ( 'Table'[Category] ),
    CALCULATE ( SUM ( 'Table'[Sales] ), LASTDATE ( 'Table'[Date] ) )
)

 

jdbuchanan71_0-1649252260828.png

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors