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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
juliamacg_
Frequent Visitor

How to count re-occurrences related to a value in another row

Hello! Sorry if the title isn't clear enough, I wasn't sure how to describe it.

 

The thing is: I'm looking for a way to count the re-occurrences of a given word related to another data on another row. Here's an example on Excel:

 
 

rows.jpg

 

The DAX formula I'd like to have would return the value 3, as there is 1 reoccurrence for "Julia" in Code 001, 1 reoccurrence for "Igor" in Code 002, and 1 reoccurrence for "Julia" in Code 003.

 

I'm cracking my head on this one. Could anyone help me out? Thanks!

1 ACCEPTED SOLUTION
mangaus1111
Solution Sage
Solution Sage

Hi @juliamacg_ ,

try this measure

Measure = 
VAR _CountRows =COUNTROWS('Facts26')
RETURN
_CountRows - COUNTX(
                    SUMMARIZE('Facts26',
                              'Facts26'[Code],
                            'Facts26'[Analyst]
                             ),
                       _CountRows
                )

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
mangaus1111
Solution Sage
Solution Sage

Hi @juliamacg_ ,

try this measure

Measure = 
VAR _CountRows =COUNTROWS('Facts26')
RETURN
_CountRows - COUNTX(
                    SUMMARIZE('Facts26',
                              'Facts26'[Code],
                            'Facts26'[Analyst]
                             ),
                       _CountRows
                )

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Worked like a charm! Thanks so much, friend! Have a blessed day!

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.