cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent Visitor

## For a unique group calculate percentages for check column.

If I have a grouped table like:

A      B     C   D   D Count

A1    14   a    Y   2

A1    14   a    N  14

A1    20   b    N  20

A2    21   a    N   9

where D is the count of the number of yes/nos for that group, how would I check what percentage of unique groups have a Yes in them? In this example it would 33%.

2 REPLIES 2
Community Champion

Hi @hanr

You can create this two measures

```Distinct Group Count =
COUNTROWS(
GROUPBY(
Table1,
Table1[A],
Table1[B],
Table1[C]
)
)```
```% of Groups with yes =
DIVIDE(
CALCULATE(
[Distinct Group Count],
Table1[D] = "Y"
),
[Distinct Group Count]
)```
Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.

Community Support

Hi @hanr ,

You can create measure like DAX below.

`Measue1=DIVIDE(COUNT('Table'[D]),CALCULATE(COUNT('Table'[D]),FILTER(ALL('Table'),'Table'[A]=MAX('Table'[A]))))`

Best Regards,

Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly