cancel
Showing results for
Did you mean:
Regular Visitor

## How to show the % value by sub-grouping and NOT by grand total

Hi all,

I am wondering if there is way to show the percentage breakdown based on sub-grouping instead of by grand total.

For example,

I want to create a new column to show the % breakdown based on Owner column grouping intead of the grand total (201).

hence, the machine_status2 breakdown based on Owner grouping of "Social NYKT" are 5%, 35%, and 60% respectively total count of machine status under owner is 110 (5+39+66).

I am trying to use New Quick Measure, but i was lost.  Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User

## Re: How to show the % value by sub-grouping and NOT by grand total

@Tuffy Please try to post your sample data always in copiable format.

Here is the solution that you are looking for.. Create a new measure as below

```Test204Percent =
VAR _SubTotal = CALCULATE(COUNTROWS(Test204SubTotalPercent),ALLEXCEPT(Test204SubTotalPercent,Test204SubTotalPercent[Owner]))
RETURN FORMAT([Test204Cnt]/_SubTotal,"Percent")```

Assuming that you already have another measure to show the counts that you have mentioned in your screenshot. In above calculation, that measure will be [Test204Cnt] with the logic

`Test204Cnt = COUNT(Test204SubTotalPercent[MachineStatus]) `

OutputSample Data

Did I answer your question? Mark my post as a solution !

Proud to be a Datanaut !

2 REPLIES 2
Highlighted
Super User

## Re: How to show the % value by sub-grouping and NOT by grand total

@Tuffy Please try to post your sample data always in copiable format.

Here is the solution that you are looking for.. Create a new measure as below

```Test204Percent =
VAR _SubTotal = CALCULATE(COUNTROWS(Test204SubTotalPercent),ALLEXCEPT(Test204SubTotalPercent,Test204SubTotalPercent[Owner]))
RETURN FORMAT([Test204Cnt]/_SubTotal,"Percent")```

Assuming that you already have another measure to show the counts that you have mentioned in your screenshot. In above calculation, that measure will be [Test204Cnt] with the logic

`Test204Cnt = COUNT(Test204SubTotalPercent[MachineStatus]) `

OutputSample Data

Did I answer your question? Mark my post as a solution !

Proud to be a Datanaut !

Regular Visitor

## Re: How to show the % value by sub-grouping and NOT by grand total

Hi Manohar,

It doesn't work as I use the same formula like yours in my measure..

SumOfTotalCountOfMachineStatusByOwner = COUNT('Machines-20190219'[Machine_status2])/

Calculate(Count('Machines-20190219'[Machine_status2]), All('Machines-20190219'))