Forum Discussion
Distinct Count
- 10 months ago
Brilliant. Thank you. I appreciate that. It is CountRows.
You can do this with a simple CALCULATE+ DISTINCTCOUNT.
If you want the distinct count of rows where LAR = "ZPROG001" and AES = 10 or 11, try:
meas_Count_LAR_AES =
CALCULATE(
DISTINCTCOUNT(YourTable[YourRowID]),
YourTable[LAR] = "ZPROG001",
YourTable[AES] IN { 10, 11 }
)
Replace YourTable with your table name and YourRowID with a unique row column.
If LAR is already unique per row, you can also distinct-count LAR directly:
meas_Count_LAR_AES =
CALCULATE(
DISTINCTCOUNT(YourTable[LAR]),
YourTable[LAR] = "ZPROG001",
YourTable[AES] IN { 10, 11 }
)
Shai Karmani | Data & Analytics
If it helped please mark as resolved & give a kudo so others can find it too.
- DenbyG10 months agoFrequent Visitor
Hi, Sorry but it just returns a value of 1. I know there are more than that
Learning aim reference
ZPROG001
Z0059747
ZPROG001
Z0059747
ZPROG001
ZPROG001
ZPROG001
ZPROG001
ZPROG001
ZPROG001
Z0059747
ZPROG001
ZPROG001
Z0059747
ZPROG001Applicable employment status
11
0
11
0
2
10
10
10
11
10
0
11
10
0
1- MasonMA10 months ago
Super User
Would you want to count unique items or all items? If it is a distinct count, the Measure should be all good. If you would want to count all rows that meet the conditions, then change the DISTINCTCOUNT() to COUNTROWS('table').
- DenbyG10 months agoFrequent Visitor
Brilliant. Thank you. I appreciate that. It is CountRows.