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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
thampton
Helper III
Helper III

count/group by for column with added filter

i have a table with clientid / salesorder# / orderdate. I would like to have a measure to count how many clients have more than 2 or more orders total. So im thinking this would need to summarize, then do a filter, but not sure how that syntax would work. 

 

For example, below is an example table. I would like a measure to show 1 because only 1 client has had 2 or more orders in this time frame. 

 

Client           Order ID               Date

a                   1563                    9-2-2020

a                   1234                   9-2-2020

a                   2345                   9-6-2020

b                  5678                    9-7-2020

 

Thank you

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@thampton ,Try

Client >2 order =countx(filter(summarize(Table,Table[Client] , "_1", count(Table[Order ID])),[_1]>=2),[Client])

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@thampton ,Try

Client >2 order =countx(filter(summarize(Table,Table[Client] , "_1", count(Table[Order ID])),[_1]>=2),[Client])

@amitchandak This is awesome! Thank you so much. 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.