Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Tienes que añadir una columna"Grupo"para identificar el grupo.
Consulte el siguiente ejemplo.
Tabla de muestras.
RuleName | Total de registros | Total Record Passed | Grupo |
A | 100 | 50 | 1 |
B | 200 | 150 | 1 |
C | 230 | 75 | 2 |
D | 50 | 230 | 2 |
E | 150 | 50 | 3 |
F | 75 | 150 | 3 |
Tabla calculada
Table 2 =
CALCULATETABLE (
SUMMARIZE (
'TestData',
TestData[Group],
"Rule Name", CONCATENATEX (
DISTINCT ( TestData[RuleName] ),
TestData[RuleName],
","
),
"Total Record", SUM ( TestData[Total Records] ),
"Total Record Passed", SUM ( TestData[Total Record Passed] )
)
)
¿Respondí a tu pregunta? ¡Marca mi puesto como solución!
Apreciar con un kudos🙂
cualquier sugerencia como una consulta SQL
Hola @Choosenbuy ,
Para SQL Query, puede intentar escribirlo de la siguiente manera:
select case when RuleName in ('A','B') then 'AB' when RuleName in ('C','D','E') then 'CDE' when RuleName in ('F','G') then 'FG' end as RuleName,
sum([Total Records])"Total Records", sum([Total Records Passed]) "Total Records Passed",sum([Total Records Failed]) "Total Records Failed",
cast(cast(100 *(sum([Total Records Passed])/sum([Total Records]) )as decimal(18,1) ) as varchar(50))+'%' "Pass%",
cast(cast(100 *(sum([Total Records Failed])/sum([Total Records]) )as decimal(18,1) ) as varchar(50))+'%' "Fail%"
from Rules
group by
case when RuleName in ('A','B') then 'AB' when RuleName in ('C','D','E') then 'CDE' when RuleName in ('F','G') then 'FG' end
Saludos
Rena
Gracias. permítanme probar la solución