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
Anonymous
Not applicable

Count how often a same order number appears.

Hi people, I hope somebody can help. I think the soulution could be pretty easy, but I couldn't figure it out yet:

 

I have a column with different and same order numbers. I want to count how often a order numbers appears just one time and how often an order numbers appears multiple times. And then show it in a diagram.

 

In Excel I would just create a pivot table which count the quantity of how many times a number appears and then I could show the actual number with an "COUNTIF" function.

How could I do it in a efficient way in PowerBi?

 

Thanks in advance! 🙂

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

You could try these two expressions

 

Orders One Time =
COUNTROWS (
    FILTER (
        DISTINCT ( Table[OrderNumber] ),
        CALCULATE ( COUNTROWS ( Table ) ) = 1
    )
)

Orders Multiple Times =
COUNTROWS (
    FILTER (
        DISTINCT ( Table[OrderNumber] ),
        CALCULATE ( COUNTROWS ( Table ) ) > 1
    )
)

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat







Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
mahoneypat
Microsoft Employee
Microsoft Employee

You could try these two expressions

 

Orders One Time =
COUNTROWS (
    FILTER (
        DISTINCT ( Table[OrderNumber] ),
        CALCULATE ( COUNTROWS ( Table ) ) = 1
    )
)

Orders Multiple Times =
COUNTROWS (
    FILTER (
        DISTINCT ( Table[OrderNumber] ),
        CALCULATE ( COUNTROWS ( Table ) ) > 1
    )
)

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat







Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

Thank you very much, that worked out perfectly!  😊

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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!

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.

Top Solution Authors
Top Kudoed Authors