Hola
Así que soy nuevo en DAX y vengo de un fondo EXCEL por lo que cargas de mi código implica funciones IF anidadas para aplicar diferentes condiciones a definiciones de campo específicas.
Así, por ejemplo;
hay dos sectores; "CVL" y "WCB"
y 7 grupos de servicios; HL02 - HL08 (HL05 es el único grupo de servicios que existe en ambos, pero tiene un tratamiento diferente en cada uno;
Multiplicador de minutos de rendimiento del grupo de servicios sectoriales
CVL HL05 0,5
WCB HL02 0.15
WCB HL03 0.1
WCB HL04 0.2
WCB HL05 0.05
WCB HL06 0.25
WCB HL07 0.05
WCB HL08 0.15
Así que mi IF anidado se vería así ('Fct SG PTL ODP Period' es mi tabla de hechos);
ZZ TfW PTL ODP ?
IF('Fct SG PTL ODP Period'[Sector]-"WCB",
IF('Fct SG PTL ODP Period'[Service Group]-"HL02",
[Período de minutos de rendimiento de TfW SG]*0.15,
IF('Fct SG PTL ODP Period'[Service Group]-"HL03",
'Fct SG PTL ODP Period'[TfW SG Performance Mins Period]*0.1,
IF('Fct SG PTL ODP Period'[Service Group]-"HL04",
'Fct SG PTL ODP Period'[TfW SG Performance Mins Period]*0.2,
IF('Fct SG PTL ODP Period'[Service Group]-"HL05",
'Fct SG PTL ODP Period'[TfW SG Performance Mins Period]*0.05,
IF('Fct SG PTL ODP Period'[Service Group]-"HL06",
'Fct SG PTL ODP Period'[TfW SG Performance Mins Period]*0.25,
IF('Fct SG PTL ODP Period'[Service Group]-"HL07",
'Fct SG PTL ODP Period'[TfW SG Performance Mins Period]*0.05,
IF('Fct SG PTL ODP Period'[Service Group]-"HL08",
'Fct SG PTL ODP Period'[TfW SG Performance Mins Period]*0.15,
«Período FCt SG PTL ODP»[TfW SG Performance Mins Period]*0.5))))))))))))))))))))))
¿Cómo consigo que DAX replique esto? ¿No me permitirá reconocer [Sector] o [Grupo de servicios] como campos válidos??
Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.
Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!
Join the biggest FREE Business Applications Event in LATAM this February.
User | Count |
---|---|
3 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |