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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
danial_mcgreevy
Frequent Visitor

DAX Counting Groups of Repetition in Row

Hey

 

Not long into my DAX understanding and i've hit a brickwall.

 

I need to create a measure that counts if a RANDOM_PERSON_ID is repeated 5 times.

 

So, my measure value with the test dataset should be 1 (9662AF155704B3F7).

 

Capture.PNG

 

Note that the table is on a Tabular Cube and does not have a uniqueidentifier and has about 46 million records. 

 

Any help greatly appreciated.

 

Thanks

 

Danny

 

 

 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@danial_mcgreevy , Try this measure with RANDOM_PERSON_ID in a visual

countx(filter(summarize(table,table[RANDOM_PERSON_ID], "_1",count(*)), [_1]>=5),[RANDOM_PERSON_ID])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@danial_mcgreevy , Try this measure with RANDOM_PERSON_ID in a visual

countx(filter(summarize(table,table[RANDOM_PERSON_ID], "_1",count(*)), [_1]>=5),[RANDOM_PERSON_ID])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Huge thanks.

 

Slight amendment to handle strings but works a charm.

 

COUNTAX (
FILTER (
SUMMARIZE (
Table,
Table[RANDOM_PERSON_ID],
"EqualTo5", COUNTA ( Table[RANDOM_PERSON_ID] )
),
[EqualTo5] = 5
),
Table[RANDOM_PERSON_ID]
)

 

Kind regards

 

Dannt

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.