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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Syndicate_Admin
Administrator
Administrator

Counting Duplicates in a Table with DAX

Hello everyone.

I have tried in several ways to count duplicates in a table but as the record is repeated the count progresses.

An example

fav_ccc2021_0-1706114694639.png

Thank you in advance

Best regards!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @Syndicate_Admin 

Based on your description, I have created a measure to achieve the effect you are looking for. Following picture shows the effect of the display.

 

vyaningymsft_0-1706693189525.png

 

 

Measure:

Counts =

VAR _Counts =

    COUNTAX (

        FILTER ( ALL ( 'Table' ), 'Table'[ID] = SELECTEDVALUE ( 'Table'[ID] ) ),

        'Table'[ID]

    )

RETURN

    _Counts

If this does not work, could you please share some sample data without sensitive information and expected output.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

 

 

View solution in original post

5 REPLIES 5
speedramps
Super User
Super User

@Syndicate_Admin

please be polite and promptly click "accept as solution" and the thumbs up buttons.

Remeber that we are unpaid volunteers and you might wnat help again.😁

Anonymous
Not applicable

Hi, @Syndicate_Admin 

Based on your description, I have created a measure to achieve the effect you are looking for. Following picture shows the effect of the display.

 

vyaningymsft_0-1706693189525.png

 

 

Measure:

Counts =

VAR _Counts =

    COUNTAX (

        FILTER ( ALL ( 'Table' ), 'Table'[ID] = SELECTEDVALUE ( 'Table'[ID] ) ),

        'Table'[ID]

    )

RETURN

    _Counts

If this does not work, could you please share some sample data without sensitive information and expected output.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

 

 

Syndicate_Admin
Administrator
Administrator

Thank you Master!!

In excel it's not hard to do it, in fact I did, but taking it to Dax I didn't know..

Thank you very much

ThxAlot
Super User
Super User

ThxAlot_0-1706131944733.png

 

The most fundamental Excel formula does the trick,

ThxAlot_1-1706131994585.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



speedramps
Super User
Super User

Try this measure

 

row count = 
CALCULATE(
    COUNTROWS(yourdata),
    ALLEXCEPT(yourdata,yourdata[ID]))

 

speedramps_0-1706115566010.png

 

Thanks for the clear description of the problem with example data. I wish everyone did that!

Remember we are unpaid volunteers, and you have got free expert help which took a lot of effort,
This solution works and does exactly what you asked.
So please quickly click the [accept as solution] and the thumbs up button to leave kudos. 

One question per ticket please. If you need to change or extend your request then please raise a new ticket.

You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you ! 

If you quote @speedramps in your next tickets then I will then receive an automatic notification, and will be delighted to help you again.

Please now click the [accept as solution] and the thumbs up button.  Thank you.

 

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.