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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Kira_Net
Helper I
Helper I

How can I calculate number of clients who ordered greater than 1000 times?

 I need to calculate
1. The number of clients who ordered more than 1000 times last week

2.The total volume of orders (for those clients who ordered more than 1000 times)
3.The percent to total (The contribution of those clients order to the total volume.)

 

The expected result should be a scalar value and visualized on a scorecard.

 

My data table looks like

ClientOrder Date
A04/21/2022
B04/12/2022
B03/17/2022
C04/28/2022
A04/29/2022
A04/27/2022
A04/24/2022
C04/22/2022
C04/28/2022
2 REPLIES 2
Anonymous
Not applicable

Hi @Kira_Net ,

Please refer to the measures.

 

Measure number of clients>1000 =
COUNTROWS (
    FILTER (
        VALUES ( OrderTable[Client] ),
        CALCULATE (
            COUNTROWS ( OrderTable ),
            ALLEXCEPT ( OrderTable, OrderTable[Client], OrderTable[OrderDate] ),
            DATESBETWEEN ( OrderTable[OrderDate], TODAY () - 7, TODAY () )
        ) > 1000
    )
)
Measure_total= Calculte(sum('OrderTable' [orders]),filter(all('OrderTable'),datesbetween('OederTable'[OederDate],Today()-7,Today())&&[Measure number of clients>1000)
Measure=var _total=calculate(sum('OrderTable'[orders]),filter(all('OrderTable'),DATESBETWEEN ( OrderTable[OrderDate], TODAY () - 7, TODAY () )))
var _bigthan1000=[Measure total]
return
Divide(_bigthan,_total)

 

If I have misunderstood your meaning, please provide your pbix file without privacy information and desired output.

 

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

danextian
Super User
Super User

Hi @Kira_Net ,

I am not sure how you divide your period by week but these measures should return the order count per client (assuming each row count in the table is equivalent to an order) and the number of clients withmore than 1000 orders:

Order Per Client = 
CALCULATE ( COUNT ( _Table[Order Date] ), ALLEXCEPT ( _Table, _Table[Client] ) )


Clients with orders above 1000 =
SUMX (
    SUMMARIZE (
        VALUES ( _Table[Client] ),
        "Order", IF ( [Order Per Client] > 100, 1 )
    ),
    [Order]
)

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.