cancel
Showing results for
Did you mean:

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Frequent Visitor

## % per group

I have Agents that belongs to a group, like the sample data below, what I like to do is the % not being of every agent of every group but be % relative to its group.

Agent                                                                                 Group                       Tickets closed            %

 Analista Grupo Tickets Fechados %GT Tickets Fechados Jessica Brito 02 - Vendas 26 5.94% Jonatas Cruz 02 - Vendas 35 7.99% Rafael Ferreira 02 - Vendas 21 4.79% Vanderlei Gabriel de Souza 02 - Vendas 25 5.71% Heliberta Siqueira 03 - Store Manager 17 3.88% Luciano Pereira 03 - Store Manager 1 0.23% Stephany Marques 03 - Store Manager 33 7.53% Caio Augusto Silva Santos 04 - E-commerce 14 3.20% Rafael Cavalcante 04 - E-commerce 3 0.68% Rafael Garcia 04 - E-commerce 8 1.83%
1 ACCEPTED SOLUTION
Microsoft

Hi @Varela

How do you get the sample % data, based on your description, the percentage of Jessica Brito should be 35/(26+35+21+25)=32% rather than 7.99% given. Or you post part of your data?

First, please create a measure to calculate the total sum of each group. Then create a calculate column to get what you want.

`Total group = CALCULATE(SUM(Table15[Tickets closed]),ALLEXCEPT(Table15,Table15[Group]))Percentage = Table15[Tickets closed]/Table15[Total group]`

Best Regards,
Angelia

6 REPLIES 6
Helper II

I dont understand ur question.

You want the % to displayed for every agent out of his/her group.

Eg . Jessica Brito belong to group 2

Formula = Tickets closed by Jessica / Total Tickets closed in Group 2

Frequent Visitor

yes, thats what I want, don't really know how to do this though

Microsoft

Hi @Varela

How do you get the sample % data, based on your description, the percentage of Jessica Brito should be 35/(26+35+21+25)=32% rather than 7.99% given. Or you post part of your data?

First, please create a measure to calculate the total sum of each group. Then create a calculate column to get what you want.

`Total group = CALCULATE(SUM(Table15[Tickets closed]),ALLEXCEPT(Table15,Table15[Group]))Percentage = Table15[Tickets closed]/Table15[Total group]`

Best Regards,
Angelia

Frequent Visitor

it was just a sample

Helper II

@v-huizhn-msft Thanks. This works. can you explain when to use ALL and when to use ALLEXCEPT

@Varela Can u try the formula which Angelia suggested

Memorable Member

@Thiyags@You could drag and drop the filter(Slicer control) for group into page, then choose one option, you will understand that ALL will ignore your filter context and still apply for all values in dataset.

Announcements

#### Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

#### Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

#### Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

#### The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors