Forum Discussion
COUNTIFS Functionality in DAX
- 9 years ago
According to your description, you want to count rows which meet the criteria. Right?
You can create a measure like below:
COUNTIFS = CALCULATE ( COUNTROWS ( Table ), FILTER ( Table, Table[fault_code] = fault_code1 && Table[equipment_id] = equipment_id1 ) )Regards,
If you just want the count you can achieve this without any Measures or Calculated Columns.
Just create a Matrix.
Place Name in Rows - place Color in Columns - finally place either Name or Color in Values and change to display Count.
If you insist on having a COLUMN with this information
Concatenate the possible Name-Color combinations in a column and then count the results of that column
So first create a COLUMN:
Column = 'Table'[Name]&"-"&"'Table'[Color]
then create a COLUMN:
Countifs Column = CALCULATE ( COUNTA ( 'Table'[Column] ), ALLEXCEPT('Table', 'Table'[Column] ) )
That should do it! Good Luck! :smileyhappy:
you are awesome. i'm going to keep bugging you. congrats :)
I have 100s of thousands of rows and thousands of unique combinations.