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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
hosea_chumba
Helper I
Helper I

DAX issue

I have a table "Sales"with the columns for product, customer number and group ID. I would like to identify groups that have more than 5 members for product "M", why is the below formula not working, kindly suggest a better approach;

GroupsWithMoreThanFiveMembersAndProduct is M =
CALCULATETABLE(
   SUMMARIZE(
       FILTER(
           'Sales',
           'Sales'[Product] = "M"
       ),
       'Sales'[Group ID],
       "Count", COUNT('Sales'[Customer Number])),
   [Count] > 5
)
1 REPLY 1
Dangar332
Super User
Super User

Hi, @hosea_chumba

@hosea_chumba  

if you want to make new table with group id which has more then 5 customer with product "M"
try below 
just adjust your table and column name

 

 

 

result=
ADDCOLUMNS(
    VALUES(customer[gropuid]),
    "co",
    CALCULATE(
       COUNT(customer[customer]),
       customer[product]="m"
     )
 )

or 
result= 
SUMMARIZE(
     customer,customer[gropuid],
     "cou",
     COUNTX(
          FILTER(
           customer,
           customer[product]="m"
          ),
        customer[customer]
  )
)

 

 

 

you can use below measure which give you true, false 

 

Measure 3 = 
 COUNTX(
    FILTER(
       customer,
       customer[product]="m"
    ),
    customer[gropuid]
  )>4

 

 

out put like

Dangar332_0-1699440695148.png

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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