Forum Discussion
Hems
4 years agoFrequent Visitor
Count rows and group by on multiple columns
Columns are from different tables and need to get similar output using DAX
- 4 years ago
Hi Hems ,
According to your description, here's my solution.
Create a measure.
Count = CALCULATE ( COUNT ( 'Table'[id] ), FILTER ( ALL ( 'Table' ), 'Table'[col1] = MAX ( 'Table'[col1] ) ), FILTER ( ALL ( 'Table2' ), 'Table2'[col2] = MAX ( 'Table2'[col2] ) ) )Get the expected result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
4 years agoHems , Based on what I got
new column =
Countx(filter(Table, [Col1] =earlier([Col1]) && [Col2] =earlier([Col2]) ), [ID] )