Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
If I have the dataset below and want to find out the amount of categories with 2 or less IDs belonging, how do I do this.
I have found the total amount of categories (in this example, num_cat = 4), but I struggle to find the number of categories with 2 or less IDs connected to it.
Num_cat_less_than_2 = 2 because only category C and D has less than 2 IDs connected to them.
Num_Cat_Less_Than_2 : =
COUNTROWS (
FILTER (
ADDCOLUMNS (
VALUES ( 'Table'[Category] ),
"idcount", CALCULATE ( COUNTROWS ( 'Table' ) )
),
[idcount] < 2
)
)
Hi @Anonymous ,
You can add both your column in table visual and take distinct of your ID column
and now select filter as below:-
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Thank you! I forgot to specify that I need to formulate this in DAX, not as a visualization.
User | Count |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
22 | |
11 | |
10 | |
10 | |
8 |