Forum Discussion
TA9
3 years agoFrequent Visitor
counting occurrences
Hi, I have two fields ID and outcome. Each ID can have more than one outcome and each outcome is on a separate row (example below) ID Outcome 1 A 1 B 2 C 3 A 3 C 4 ...
- 3 years ago
Hi,
I suggest ( and agree with you) having an additional table like below.
Please check the below picture and the attached pbix file whether it suits your requirement.
Number of Occurreces measure: = VAR _newtable = ADDCOLUMNS ( DISTINCT ( Data[ID] ), "@count", CALCULATE ( COUNTROWS ( Data ) ) ) VAR _filtertable = FILTER ( _newtable, [@count] = MAX ( 'Axis'[Axis] ) ) RETURN COUNTROWS ( _filtertable )
Jihwan_Kim
3 years agoSuper User
Hi,
I suggest ( and agree with you) having an additional table like below.
Please check the below picture and the attached pbix file whether it suits your requirement.
Number of Occurreces measure: =
VAR _newtable =
ADDCOLUMNS ( DISTINCT ( Data[ID] ), "@count", CALCULATE ( COUNTROWS ( Data ) ) )
VAR _filtertable =
FILTER ( _newtable, [@count] = MAX ( 'Axis'[Axis] ) )
RETURN
COUNTROWS ( _filtertable )
TA9
3 years agoFrequent Visitor
That worked perfectly! thank you 😀