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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
CuriousMonkey
Regular Visitor

Count distinct customers by highest segment / last date

Hello,

 

I am looking for a measure to use in a table showing all shopping segments and the distinct number of relevant customers.

CuriousMonkey_2-1681719764079.png

 

There are << 3 >> different customers with multiple visits but in my final table I just want to see each counted once - shown in the highest ShoppingSegment (is determined by the latest ShoppingDate).

 

I have been working with 

 

CALCULATE(

    DISTINCTCOUNT('table'[Customer]),

    FILTER ( 'table', 'table'[ShoppingDate]  = LASTDATE ( 'table'[ShoppingDate] ) )

)

 

but when matching my result with the segments table I just receive the number of distinct customers for the very latest ShoppingDate within the whole table but not just for each single Customer...

 

Can you help me, please 🙂 ?

Thanks a lot!

CuriousMonkey

 

 

0 REPLIES 0

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.