Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Varela
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            % 

AnalistaGrupoTickets Fechados%GT Tickets Fechados
Jessica Brito02 - Vendas265.94%
Jonatas Cruz02 - Vendas357.99%
Rafael Ferreira02 - Vendas214.79%
Vanderlei Gabriel de Souza02 - Vendas255.71%
Heliberta Siqueira03 - Store Manager173.88%
Luciano Pereira03 - Store Manager10.23%
Stephany Marques03 - Store Manager337.53%
Caio Augusto Silva Santos04 - E-commerce143.20%
Rafael Cavalcante04 - E-commerce30.68%
Rafael Garcia04 - E-commerce81.83%
1 ACCEPTED SOLUTION

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]

 

11.png

If you have any question, please feel free to ask.


Best Regards,
Angelia

View solution in original post

6 REPLIES 6
Thiyags
Helper II
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

 

 

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

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]

 

11.png

If you have any question, please feel free to ask.


Best Regards,
Angelia

it was just a sample

@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

@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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.