Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hola a todos!!!
Estoy intentado crear el INDICE DE SEGREGACION OCUPACIONAL GENERAL el cual se debe medir por cargo, genero mes a mes para esto me estoy basando en la siguiente tabla
Esta es mi tabla de información
Necesito construir las mismas métricas y debo tener en cuenta que solo se miden aquellos cargos en que hay personal de los dos generos.
Les agradezco su colaboración.
Solved! Go to Solution.
Hi @julian_urrea ,
I apologize for misunderstanding you earlier, please do the following.
The Table data is shown below:
Please follow these steps:
1. Use the following DAX expression to create a table named 'Table2'
Table 2 =
VAR _a = SUMMARIZE('Table','Table'[Cargo],'Table'[Fecha])
VAR _b = ADDCOLUMNS(_a,"A",IF(ISBLANK(CALCULATE(COUNT('Table'[Genero]),'Table'[Genero] = "Masculino")),0,CALCULATE(COUNT('Table'[Genero]),'Table'[Genero] = "Masculino")))
VAR _c = ADDCOLUMNS(_b,"B",IF(ISBLANK(CALCULATE(COUNT('Table'[Genero]),'Table'[Genero] = "Femenino")),0,CALCULATE(COUNT('Table'[Genero]),'Table'[Genero] = "Femenino")))
RETURN _c
2.Use the following DAX expression to create columns in 'Table2'
C = [A] +[B]
1A = [A]
2A = DIVIDE([1A],[C])
THO = 20
3A = DIVIDE([1A],20)
1B = [B]
2B = DIVIDE([1B],[C])
TMO = 50
3B = DIVIDE([1B],50)
4 = ABS([3A] - [3B])
3.Use the following DAX expression to create a measure
Measure = DIVIDE(SUM('Table 2'[4]),2)
4.Final output
Hi @julian_urrea ,
The Table data is shown below:
Please follow these steps:
1. Use the following DAX expression to create a table
Table 2 = FILTER('Table',NOT ISBLANK('Table'[Genero]))
2.Use the following DAX expression to create a measure
Hombre =
VAR _a = CALCULATE(COUNT('Table 2'[Genero]),'Table 2'[Genero] = "Masculino")
RETURN IF(ISBLANK(_a),0,_a)
3.Use the following DAX expression to create a measure
Mujer =
VAR _a = CALCULATE(COUNT('Table 2'[Genero]),'Table 2'[Genero] = "Femenino")
RETURN IF(ISBLANK(_a),0,_a)
4.Use the following DAX expression to create a measure
Total = [Hombre] + [Mujer]
5.Use the following DAX expression to create a measure
ABSOLUTO Hombres = [Hombre]
6.Use the following DAX expression to create a measure
% hombres en el puesto = DIVIDE([ABSOLUTO Hombres],[Total],0)
7.Use the following DAX expression to create a measure
ABSOLUTO Mujeres = [Mujer]
8.Use the following DAX expression to create a measure
%Mujeres en el puesto = DIVIDE([ABSOLUTO Mujeres],[Total],0)
9.Final output
Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Buenas tardes @v-zhouwen-msft, primero que todo agradezco el tiempo que te tomaste para adyuarme con mi consulta.
Estuve revisando la solución que me ofreces y me genera error al tratar de mostrar la información por mes, ya realice las mismas metricas que me planteas y con eso busco obtener el último paso que es 4= ABS(3A-3B), al momento de mostrarlo por mes la formula pierde consistencia.
Adjunto una imagen de lo que me sale.
Hi @julian_urrea ,
Regarding your question, if you use the date as the x-axis, you will first calculate the sum of column '3A' and the sum of column '3B' before proceeding with the calculation, i.e. ABS(1-1).
If you want to view data in multiple dimensions, i.e.,you can use a matrix.
If I'm misunderstanding, please provide the data and show the expected results in pictures.
Hola @v-zhouwen-msft.
En teoría debo presentar un gráfico de barras mensual o trimestral como muestro a continuación, este gráfico que te muestro es un ejemplo que me dieron hacia lo que debo llegar.
Yo tengo una tabla de tiempo relacionada a mi tabla Base que es con la que trabajo la información principal del tablero. y cuanto con una informacion similar a la que te proporcioné
Lo único que no te dije es que el calculo que se ve en el gráfico de barras es el resaltado en la siguiente imagen que esta en letra roja
Se calcula sacando el último paso 4= ABS(3A-3B)/2
El resultado que vez al final es la suma de las filas de 4=ABS(3A-3B)
Hi @julian_urrea ,
I apologize for misunderstanding you earlier, please do the following.
The Table data is shown below:
Please follow these steps:
1. Use the following DAX expression to create a table named 'Table2'
Table 2 =
VAR _a = SUMMARIZE('Table','Table'[Cargo],'Table'[Fecha])
VAR _b = ADDCOLUMNS(_a,"A",IF(ISBLANK(CALCULATE(COUNT('Table'[Genero]),'Table'[Genero] = "Masculino")),0,CALCULATE(COUNT('Table'[Genero]),'Table'[Genero] = "Masculino")))
VAR _c = ADDCOLUMNS(_b,"B",IF(ISBLANK(CALCULATE(COUNT('Table'[Genero]),'Table'[Genero] = "Femenino")),0,CALCULATE(COUNT('Table'[Genero]),'Table'[Genero] = "Femenino")))
RETURN _c
2.Use the following DAX expression to create columns in 'Table2'
C = [A] +[B]
1A = [A]
2A = DIVIDE([1A],[C])
THO = 20
3A = DIVIDE([1A],20)
1B = [B]
2B = DIVIDE([1B],[C])
TMO = 50
3B = DIVIDE([1B],50)
4 = ABS([3A] - [3B])
3.Use the following DAX expression to create a measure
Measure = DIVIDE(SUM('Table 2'[4]),2)
4.Final output
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
21 | |
15 | |
14 | |
11 | |
7 |
User | Count |
---|---|
26 | |
24 | |
12 | |
11 | |
10 |