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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Hi @amitchandak 

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

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Client table 

ppatil_0-1654667605175.png

OrderDetails Table

ppatil_1-1654667655929.png

Relationship between these two tables

ppatil_2-1654667744356.png

 

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.