Forum Discussion
count ifs
- 5 years ago
Anonymous This is because you have [Floor] still in the table. A couple of things you can do, either use a matrix visual instead to get the subtotals;
[Count of Floors] in Values
[Facility] in Rows
[Building] in Rows
[Floor] in Rows
Expand down to all levels using the double connected arrows (looks like a fork kind of) at top of matrix.
or update your measure:
Count of All Floors = CALCULATE(COUNTA('public facilities'[name]) , ALL('public facilities'[floor]))
Anonymous The countifs in DAX comes down to how you use it, if you want to count number of floors, simply create a measure:
Count of Floors = COUNTA('public facilities'[name])
Then put this in a table or matrix visual. If using a matrix, put:
[Count of Floors] in Values
[Facility] in Rows
[Building] in Rows
If using a table, just put them in this order:
[Facility]
[Building]
[Count of Floors]
If you want distinct count, use camargos88 formula.
You can also use the COUNTROWS formula you have already created if you want to include blank values in your count.
Hope that makes sense?