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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.