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

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.

Reply
matrix_user
Helper III
Helper III

Remove, subtract or exclude 1 order from an expression that counts 2 or more orders.

I have a DAX expression:

 

Reorders of two or more = CALCULATE(SUM(FactTable[Orders]),'FactTable[Count of duplicates orders]>=2)

that sums orders of two or more per client (rows).

 

For each duplicates, there is an original order.

 

How do I modify the DAX expression so that a subraction of 1  will exclude the original order from duplicates orders only.

 

When I say "duplicates", it can include 3 or more orders.

 

matrix_user_0-1678750471141.png

Thanks in advance.

1 REPLY 1
wdx223_Daniel
Super User
Super User

CALCULATE(SUM(FactTable[Orders]),FILTER(ALL('FactTable[Count of duplicates orders]),'FactTable[Count of duplicates orders]-IF('FactTable[Count of duplicates orders]<2,0,1)>=2))

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.