Forum Discussion
tjalleph
6 years agoFrequent Visitor
Dynamic and categorized distinct counting
Hi all, I'm fairly new to Power BI and trying to do something that could be called dynamic and categorized distinct couting. A simplified sample of my data would like this: ID Category ...
- 6 years ago
Hi tjalleph ,
you can write your measures like this:
m0 = COUNTROWS ( FILTER ( ADDCOLUMNS ( VALUES ( 'Table'[ID] ); "maxCodedAnswer"; CALCULATE ( MAX ( 'Table'[Coded_answer] ) ) ); [maxCodedAnswer] = 0 ) )Cheers,
Sturla
If this post helps, then please consider Accepting it as the solution. Kudos are nice too.
sturlaws
6 years agoResident Rockstar
Hi tjalleph ,
you can write your measures like this:
m0 =
COUNTROWS (
FILTER (
ADDCOLUMNS (
VALUES ( 'Table'[ID] );
"maxCodedAnswer"; CALCULATE ( MAX ( 'Table'[Coded_answer] ) )
);
[maxCodedAnswer] = 0
)
)
Cheers,
Sturla
If this post helps, then please consider Accepting it as the solution. Kudos are nice too.
tjalleph
6 years agoFrequent Visitor
Thanks! First results seems to be like I would expect them to be. I'm gonna try it on an additional dataset. Will come back early next week with the results.
Kind regards,
Tjalle