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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.