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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
olimilo
Responsive Resident
Responsive Resident

Aggregate count based on two columns using DAX (column/measure)?

I have the following data. On the left is a table that contains the issues of each member of the team and the date when the issue was found. I would like to get an aggregate (count rows) of these issues in the main Data table (on the right) based on the Name and the Date columns. The Issues and Data table are indirectly related via a Calendar table.

 

2019-11-14 12_22_06-Book2 - Excel.png

 

I'm able to do this by using Power Query but it's taking way too long so I was wondering if this is possible using DAX?

1 ACCEPTED SOLUTION
v-xuding-msft
Community Support
Community Support

Hi @olimilo ,

Please try the formula below.

Column = 
CALCULATE (
 COUNT ( Issue[Issue] ) + 0,
 FILTER ( Issue, Issue[Name] = Data[Name] && Issue[Date] = Data[Date] )
)

6.PNG 

Best Regards,

Xue Ding

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

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-xuding-msft
Community Support
Community Support

Hi @olimilo ,

Please try the formula below.

Column = 
CALCULATE (
 COUNT ( Issue[Issue] ) + 0,
 FILTER ( Issue, Issue[Name] = Data[Name] && Issue[Date] = Data[Date] )
)

6.PNG 

Best Regards,

Xue Ding

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

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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