Forum Discussion
sagidam
7 years agoFrequent Visitor
DAX COUNT/COUNTA filtered by columns
Hello friends,
I try to find from the table the numbers of row by company name ( i have more then 100 companies),
When I want to be filtered by field By compname,
Example of a table "BALL"
id | compname | ballance |
1 | A | 26 |
1 | B | 15 |
2 | B | 9 |
2 | A | 15 |
3 | B | 5 |
3 | A | 3 |
6 | B | 434 |
In this example the result will be
A=3 (numbers A rows)
B=4 (number B rows )
- Anonymous7 years ago
Please use following formula for measures:
Count row := CALCULATE(COUNTROWS(Table3))
Then you will have this table:
7 Replies
- AnonymousNot applicable
Please use following formula for measures:
Count row := CALCULATE(COUNTROWS(Table3))
Then you will have this table:
- sagidamFrequent Visitor
sorry its give me the same resualt
- MFelix
Super User
Hi sagidam,
If you add the colum company to a visual and then balance or ID and select the option count it will give the expected result.
However if you need a measure in dax you can use
Count companie = COUNTA(BALL[compname])
Then selecting the the companie column will give you context to count the number of rows.
Regards,
MFelix