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
mtb1973
Frequent Visitor

How to Count occurrences based on other columns

Hello, I am struggling to put together a formula that calculates how many times the combination of WC1 and Job Order Number occur per Family Code in the given context. In blue is what the count should be. Any assistance is greatly appreciated. Thanks

 

 

Capture.PNG

3 REPLIES 3
harshnathani
Community Champion
Community Champion

Hi @mtb1973 ,

 

You can use the following measure.

 

Measure =

CALCULATE(COUNT(Table1[WC1]),ALLEXCEPT(Table3,Table1[WC1], Table1[Job Order Number]))

 

Regards,

Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!!

AlB
Community Champion
Community Champion

Hi @mtb1973 

If a measure is what you want and you're going to use it in a table visual like the one you show, try this:

Measure =
COUNTROWS (
    CALCULATETABLE (
        SUMMARIZE ( Table1, Table1[WC1], Table1[Job Order Number] ),
        ALL ( Table1[WC1], Table1[Job Order Number] )
    )
)

Please mark the question solved when done and consider giving kudos if posts are helpful.

Contact me privately for support with any larger-scale BI needs

Cheers 

SU18_powerbi_badge

mtb1973
Frequent Visitor

Thanks, maybe I am misunderstanding something. I am trying to count how many distinct WC/Job combinations there are for for each distinct Famuly code. 

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.