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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Fairly new to Dax - Count Question

Hello,

 

I am fairly new to Dax and find myself stuck.  I have data as below in the table with a Case Number where there are individual Tasks associated with that Case.  I need to do a couple of things, but believe they are all related in the Dax necessary to get my results.

 

I would like to create a new Column and count the number of times a Case Number has a Task = 1 and the Group = Team 1.  I'm able to get a result for that specific row of 1, but would like that result of 1 to appear on the rows having Task = 2 or 3 or beyond.

 

When I use:

 

My Team = CALCULATE(
COUNTROWS('Table Name'),'Table Name'[Case Number],'Table Name'[Group]="Team 1")
 
I get a 1 in the row where the Group = "Team 1".  However, the 4 rows below with the same Case Number (= 100) are blank and I would like to have the result return 1 on those rows as well.
 
SBoyd_0-1635875687534.png

 


 

Thank you.

1 ACCEPTED SOLUTION
ERD
Community Champion
Community Champion

Hi @Anonymous ,

You can try this:

My Team =
CALCULATE (
    COUNTROWS ( 'Table Name' ),
    'Table Name'[Task] = 1,
    'Table Name'[Group] = "Team 1",
    ALLEXCEPT('Table Name','Table Name'[Case Number])
)

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

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

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Yes, thank you!  Looks like I need to read up on ALLEXCEPT. 

 

Appreciate the feedback and help!

ERD
Community Champion
Community Champion

Hi @Anonymous ,

You can try this:

My Team =
CALCULATE (
    COUNTROWS ( 'Table Name' ),
    'Table Name'[Task] = 1,
    'Table Name'[Group] = "Team 1",
    ALLEXCEPT('Table Name','Table Name'[Case Number])
)

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

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

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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