Forum Discussion
yuvalpi
Helper I
4 years agocount unique record based on several columns
hi, i have a question regarding unique records. i have the following table: key description release 111 item for sale rel1 111 item for sale rel1 111 item for sale rel2 111 ...
- 4 years ago
yuvalpi OKK 🙂 So I didn't understand what you meant.
This is the column you need:Column 2 = VAR _current_key = 'Table'[key] VAR _result = CALCULATE( DISTINCTCOUNT( 'Table'[release] ), REMOVEFILTERS('Table'), 'Table'[key] = _current_key ) RETURN _result - 4 years ago
yuvalpi you mean like this?:
Column 2 = VAR _current_key = 'Table'[key] VAR _result = CALCULATE( DISTINCTCOUNT( 'Table'[release] ), REMOVEFILTERS('Table'), 'Table'[key] = _current_key, 'Table'[release] <> BLANK() ) RETURN _result
SpartaBI
Community Champion
4 years agoyuvalpi you mean like this?:
Column 2 =
VAR _current_key = 'Table'[key]
VAR _result =
CALCULATE(
DISTINCTCOUNT( 'Table'[release] ),
REMOVEFILTERS('Table'),
'Table'[key] = _current_key,
'Table'[release] <> BLANK()
)
RETURN
_result
- SpartaBI4 years ago
Community Champion
yuvalpi my pleasure :))
Really, check out this report:
https://community.powerbi.com/t5/Data-Stories-Gallery/Contoso-by-SpartaBI/m-p/2449543