Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hola Gurús de Power BI,
Haciendo referencia a la siguiente imagen estoy buscando una fórmula DAX para crear una columna que dé el resultado "Convertido") si hay dos valores específicos "1.2 Design Checking" & 13.1 Inspección asociada con Project ID, por ejemplo, project id 103176 tiene Design Certification & Inspection Por favor ayúdame a crear eso?
Solved! Go to Solution.
Puede probar la siguiente medida:
test =
VAR test3 =
IF (
CALCULATE (
COUNT ( 'Sample'[Project ID] ),
FILTER (
ALL ( 'Sample' ),
'Sample'[Fee Name] = "13.1 Inspection"
&& 'Sample'[Project ID] = MAX ( 'Sample'[Project ID] )
)
) >= 1,
1,
0
)
VAR test2 =
IF (
CALCULATE (
COUNT ( 'Sample'[Project ID] ),
FILTER (
ALL ( 'Sample' ),
'Sample'[Fee Name] = "1.2 Design Checking"
&& 'Sample'[Project ID] = MAX ( 'Sample'[Project ID] )
)
) >= 1,
1,
0
)
RETURN
IF (
test2 = 1
&& test3 = 1,
"1.2 Design Checking&&13.1 Inspection",
MAX ( 'Sample'[Fee Name] )
)
Final obtendrá lo siguiente:
Puede probar la siguiente medida:
test =
VAR test3 =
IF (
CALCULATE (
COUNT ( 'Sample'[Project ID] ),
FILTER (
ALL ( 'Sample' ),
'Sample'[Fee Name] = "13.1 Inspection"
&& 'Sample'[Project ID] = MAX ( 'Sample'[Project ID] )
)
) >= 1,
1,
0
)
VAR test2 =
IF (
CALCULATE (
COUNT ( 'Sample'[Project ID] ),
FILTER (
ALL ( 'Sample' ),
'Sample'[Fee Name] = "1.2 Design Checking"
&& 'Sample'[Project ID] = MAX ( 'Sample'[Project ID] )
)
) >= 1,
1,
0
)
RETURN
IF (
test2 = 1
&& test3 = 1,
"1.2 Design Checking&&13.1 Inspection",
MAX ( 'Sample'[Fee Name] )
)
Final obtendrá lo siguiente:
@ramhariessentia , Basado en lo que tengo, Pruebe una nueva columna como
if( calculate(distinctCOUNT([Fee Name]), filter(Table, [projectID] =earlier([projectID]) && [Fee Name] en {"1.2 Design Checking" , "13.1 Inspection (L1)"}))+0 =2, 1,0)
Estoy recibiendo el siguiente error de sintaxis