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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

need to sume genres from different enterprises

I have 70 enterprises, and need to sume the percentage difference of a genre separately.

I mean:

Enp1-> 22women/50employees

Ent 2 -> 55/22

Ent 3-> 21./33

So, I want to sume (22/50 + 55/22 * 21/33)/3

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

To update the formula as below.

 

Measure 2 = 
VAR _result =
    SUMX ( VALUES ( Table1[Ent] ), [Measure] )
VAR _count =
    CALCULATE ( DISTINCTCOUNT ( Table1[Ent] ), ALL ( Table1 ) )
RETURN
    IF ( ISINSCOPE ( Table1[Ent] ), _result, _result / _count )

2222.PNG

 

Please find the pbix as attached.

 

Regards,

Frank

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

4 REPLIES 4
v-frfei-msft
Community Support
Community Support

Hi @Anonymous,

 

We can create two measures as below. If it doesnt't meet your requirement, kindly share your sample data to me.Please upload your files to One Drive and share the link here.

 

Measure = 
DIVIDE (
CALCULATE ( COUNTROWS ( Table1 ), FILTER ( Table1, Table1[gender] = "male" ) ),
CALCULATE ( COUNTROWS ( Table1 ), FILTER ( Table1, Table1[gender] = "female" ) )
)
Measure 2 = 
SUMX ( VALUES ( Table1[Ent] ), [Measure] )

Capture.PNG
Also please find the pbix as attached.

 

Regards,
Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

 

What I need is "cantidad de mujeres" (quantity of woman) to be "Mujer/Quantity of people in that enterprise". But not as a table, because I need that "total" be equal to (0% + 0% + 50% + 46,15% + 37,74%)/5. This equation is equal to 26,78%, not 23,46%. This 23,46% is the result of "83/Total of the people)Sample.png

 

Hi @Anonymous ,

 

To update the formula as below.

 

Measure 2 = 
VAR _result =
    SUMX ( VALUES ( Table1[Ent] ), [Measure] )
VAR _count =
    CALCULATE ( DISTINCTCOUNT ( Table1[Ent] ), ALL ( Table1 ) )
RETURN
    IF ( ISINSCOPE ( Table1[Ent] ), _result, _result / _count )

2222.PNG

 

Please find the pbix as attached.

 

Regards,

Frank

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Really REALLY thanks man..!!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.