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
Anonymous
Not applicable

How can i divide one category for the same category in another table

Hi guys,

There are a table with many category

PabloSosa_0-1636114036920.png


I want count the category "Acesso lento" in "Primeiro_contato_sucess for example.

And count the same category in table "Atendimentos"


PabloSosa_1-1636114206575.png

 


Manually it´s like 

calculate(count(primeiro_contato_sucess[categoria],

filter(Primeiro_contato_sucesso, [categoria] = "Acesso lento")
/
calculate(count(Atendimentos[categoria],

filter(Atendimentos, [categoria] = "Acesso lento")


But have many category, it´s many work do this time for all





1 ACCEPTED SOLUTION
v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

 

I have built a data sample, please try the following formula to create a measure in Primeiro_contato_sucesso Table:

Measure = 
var _countInPrim=CALCULATE(COUNTROWS('Primeiro_contato_sucesso'),FILTER('Primeiro_contato_sucesso',[categoria]=MAX('Primeiro_contato_sucesso'[categoria])))
var _countInAten=CALCULATE(COUNTROWS('Atendimentos'),FILTER('Atendimentos',[categoria]=MAX('Primeiro_contato_sucesso'[categoria])))
return  DIVIDE(_countInPrim,_countInAten)

Output:

Eyelyn9_0-1636351243467.png

 

 

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

View solution in original post

1 REPLY 1
v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

 

I have built a data sample, please try the following formula to create a measure in Primeiro_contato_sucesso Table:

Measure = 
var _countInPrim=CALCULATE(COUNTROWS('Primeiro_contato_sucesso'),FILTER('Primeiro_contato_sucesso',[categoria]=MAX('Primeiro_contato_sucesso'[categoria])))
var _countInAten=CALCULATE(COUNTROWS('Atendimentos'),FILTER('Atendimentos',[categoria]=MAX('Primeiro_contato_sucesso'[categoria])))
return  DIVIDE(_countInPrim,_countInAten)

Output:

Eyelyn9_0-1636351243467.png

 

 

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

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.