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.
Hola, tengo una tabla como abajo donde tenemos 3 columnas pero para algunas personas en Nombre tiene el estado Verdadero y Falso. Sin embargo, hay personas que su estatus es sólo True. Ahora quiero escribir un DAX para mostrar quiénes son esas personas que tienen el estado es sólo Verdadero y otro Dax para mostrar quiénes son las personas que tienen tanto el estado.
¿Puede alguien ayudarme con esto, por favor?
País | Nombre | Estado |
India | Amit | Verdad |
India | Amit | Falso |
E.e.u.u | John | Verdad |
E.e.u.u | John | Falso |
Uk | Chris | Verdad |
Uk | Chris | Falso |
India | Suresh | Verdad |
India | Naresh | Verdad |
Uk | herrero | Verdad |
E.e.u.u | Ashish | Verdad |
Solved! Go to Solution.
Hola @akhil_PBI ,
Dependiendo de lo que necesite, puede hacer una medida como la siguiente:
Only true =
COUNTROWS (
FILTER (
SUMMARIZE (
ALLSELECTED ( 'Table'[Name]; 'Table'[Status] );
'Table'[Name];
"@count"; COUNTA ( 'Table'[Status] )
);
[@count] = 1
)
)
Both States =
COUNTROWS (
FILTER (
SUMMARIZE (
ALLSELECTED ( 'Table'[Name]; 'Table'[Status] );
'Table'[Name];
"@count"; COUNTA ( 'Table'[Status] )
);
[@count] = 2
)
)
Compruebe la conexión del archivo PBIX.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHola @akhil_PBI ,
Dependiendo de lo que necesite, puede hacer una medida como la siguiente:
Only true =
COUNTROWS (
FILTER (
SUMMARIZE (
ALLSELECTED ( 'Table'[Name]; 'Table'[Status] );
'Table'[Name];
"@count"; COUNTA ( 'Table'[Status] )
);
[@count] = 1
)
)
Both States =
COUNTROWS (
FILTER (
SUMMARIZE (
ALLSELECTED ( 'Table'[Name]; 'Table'[Status] );
'Table'[Name];
"@count"; COUNTA ( 'Table'[Status] )
);
[@count] = 2
)
)
Compruebe la conexión del archivo PBIX.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português@akhil_PBI - Usted debe ser capaz de utilizar EXCEPT y INTERSECT. Por ejemplo, algo como esto:
Measure 2 =
VAR __Name = MAX('Table (2)'[Name])
VAR __True = SELECTCOLUMNS(FILTER('Table (2)',[Status]=TRUE()),"Name",[Name])
VAR __False = SELECTCOLUMNS(FILTER('Table (2)',[Status]=FALSE()),"Name",[Name])
VAR __Names = SELECTCOLUMNS(EXCEPT(__True,__False),"Name",[Name])
RETURN
IF(__Name IN __Names,1,BLANK())
Tenga en cuenta que este es un ejemplo de un selector complejo: https://community.powerbi.com/t5/Quick-Measures-Gallery/The-Complex-Selector/td-p/1116633
@akhil_PBI - Odd, ¿pusiste esa medida en una tabla junto con la columna Nombre?
¡Sí! Así es.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |