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

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

Reply
ppatil
Helper III
Helper III

calculate client count

Hi Community..!!

I wanted to calculate count of clients that ordered more than 25000 products.
Could anyone help me to solve this.?

We have a client_id and quantity of products.

5 REPLIES 5
amitchandak
Super User
Super User

@ppatil , create a measure like

 

countx(filter(sumamrize(Table, Table[Client], "_1", sum(Table[Amount])), [_1] >25000), [Client])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak 

Client_id is in Client table and Quantity in Order table
what should be the relationship between these two tables?

Anonymous
Not applicable

Hi @ppatil,

Can you please share a pbix or some dummy data that keep raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Client table 

ppatil_0-1654667605175.png

OrderDetails Table

ppatil_1-1654667655929.png

Relationship between these two tables

ppatil_2-1654667744356.png

 

Anonymous
Not applicable

HI @ppatil,

Did these tables links based on the index field? If that is the case, you can try to use the following measure formulato to achieve your requirement.

formula =
var Orderlist=
    FILTER (
        SUMMARIZE (
            OrderDetails,
            [Index],
            [Product ID],
            "Total Amount", SUM ( OrderDetails[Quantity] )
        ),
        [Total Amount] > 25000
    )
return
COUNTROWS (FILTER (ALLSELECTED (Client),[Index] in SELECTCOLUMNS (Orderlistm,"Index",[Index])))

If these tables are not linked based on the index field, you can replace the 'Index' part in the above table with your table relationships key field.

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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