Forum Discussion
Syndicate_Admin
Administrator
2 years agoquery mysql to DAX
Hello How do I move this MySQL query to Power BI DAX? SELECT COUNT(total) AS Contador, Sum(cantidad) as canti FROM (SELECT COUNT(*) AS total,sat_reparacion.cantidad FROM sat_reparacion INNER ...
- 2 years ago
Hello,
Not sure of what you are trying to achieve doing this but :
Contador = COUNTROWS( FILTER( SUMMARIZE( FILTER( sat_reparacion, CALCULATE(SUM(sat_lineas[pvp])) = 0 ), sat_lineas[documento], "Contador", COUNTROWS(sat_reparacion), "canti", SUM(sat_reparacion[cantidad]) ), [Contador] > 0 ) )Igna
Igna
Resolver III
2 years agoHello,
Not sure of what you are trying to achieve doing this but :
Contador = COUNTROWS(
FILTER(
SUMMARIZE(
FILTER(
sat_reparacion,
CALCULATE(SUM(sat_lineas[pvp])) = 0
),
sat_lineas[documento],
"Contador", COUNTROWS(sat_reparacion),
"canti", SUM(sat_reparacion[cantidad])
),
[Contador] > 0
)
)
Igna