Forum Discussion
youconnect
6 years agoHelper I
Countrows IF
Hi, Here my table: Outcome expected: 3 I want Count Rows if id3=3 but alone. If I have id2 with id3 = 2 or 3 I don't want count these. I only want count if id3 = 3 and it's alone in id2. ...
- 6 years ago
The cleanest way I can think of doing this is as a calculated column added to your table.
Count = VAR RowIDTwo = 'Table'[id2] VAR IDTwoCount = CALCULATE(COUNTROWS('Table'),ALL('Table'),'Table'[id2]=RowIDtwo) RETURN IF ( 'Table'[id3] = 3 && IDTwoCount = 1, 1, BLANK())
jdbuchanan71
6 years agoSuper User
The cleanest way I can think of doing this is as a calculated column added to your table.
Count =
VAR RowIDTwo = 'Table'[id2]
VAR IDTwoCount = CALCULATE(COUNTROWS('Table'),ALL('Table'),'Table'[id2]=RowIDtwo)
RETURN IF ( 'Table'[id3] = 3 && IDTwoCount = 1, 1, BLANK())
youconnect
6 years agoHelper I
Worked like a charm.
Many Thanks jdbuchanan71