Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Dunner2020
Post Prodigy
Post Prodigy

Medida de depuración

Hola

Creé una medida que calcula algunos valores. La medida tiene el siguiente aspecto:

SAIDI Normalizado 24 hrs No planificados ?
var Time30Min á MAX('Interrupciones e Interrupciones'[Número de media hora de época])
devolución
CALCULATE ( SUMX(
FILTRO(
filter(ALL('Outages and Interruptions'),'Outages and Interruptions'[Epoch Half Hour Number] <- Time30Min && 'Outages and Interruptions'[Epoch Half Hour Number] >- Time30Min-47),
[Interrupción cero mínima]&&[Interrupción cero del cliente]&&[Interrupciones externas y de LV]&&[descripción no contiene]&&&[Interrupción no planificada]), [Normalizado SAIDI 30 minutos sin planificados]))

Me di cuenta de que alguna medida no está produciendo el resultado deseado. Así que decidí depurar y escribí otra medida que se parece a la siguiente:

Depurar ?
var Time30Min á MAX('Interrupciones e Interrupciones'[Número de media hora de época])
devolución
CALCULAR ( COUNTROWS(
FILTRO( filter(ALL('Outages and Interruptions'),'Outages and Interruptions'[Epoch Half Hour Number] <- Time30Min && 'Outages and Interruptions'[Epoch Half Hour Number] >- Time30Min-47),
[Interrupción mínima cero]&&[Interrupción cero del cliente]&&[Interrupciones externas y de LV]&&[descripción no contiene]&&&[Interrupción no planificada])))
Encontré que la medida real realiza el cálculo en 3 filas en lugar de 2 filas. Ahora quiero ver cuáles son esas 3 filas. ¿Podría alguien guiarme sobre cómo puedo modificar mi medida de depuración para que muestre las filas reales en lugar del recuento de filas? Además, ¿cuál es una buena manera de depurar la medida?
1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@myasir - Aquí hay un buen truco:

Normalized SAIDI 24 hrs Unplanned =
var Time30Min = MAX('Outages and Interruptions'[Epoch Half Hour Number])
Return
CALCULATE ( CONCATENATEX(
FILTER(
filter(ALL('Outages and Interruptions'),'Outages and Interruptions'[Epoch Half Hour Number] <= Time30Min && 'Outages and Interruptions'[Epoch Half Hour Number] >= Time30Min-47),
[Zero Min Interruption]&&[Zero Customer Interruption]&&[External and LV interruptions]&&[description not contains]&&[Unplanned Interruption]),  [Normalised SAIDI 30 Mins Unplanned]),",")

Reemplace su agregador como SUMX por CONCATENATEX y luego puede ver lo que está pasando "dentro" de su tabla esencialmente. Además, considere dividir el CALCULATE en variables adicionales y luego puede devolver variables individuales como parte de la medida para ver esencialmente lo que está sucediendo dentro en cada paso de la medida.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

1 REPLY 1
Greg_Deckler
Super User
Super User

@myasir - Aquí hay un buen truco:

Normalized SAIDI 24 hrs Unplanned =
var Time30Min = MAX('Outages and Interruptions'[Epoch Half Hour Number])
Return
CALCULATE ( CONCATENATEX(
FILTER(
filter(ALL('Outages and Interruptions'),'Outages and Interruptions'[Epoch Half Hour Number] <= Time30Min && 'Outages and Interruptions'[Epoch Half Hour Number] >= Time30Min-47),
[Zero Min Interruption]&&[Zero Customer Interruption]&&[External and LV interruptions]&&[description not contains]&&[Unplanned Interruption]),  [Normalised SAIDI 30 Mins Unplanned]),",")

Reemplace su agregador como SUMX por CONCATENATEX y luego puede ver lo que está pasando "dentro" de su tabla esencialmente. Además, considere dividir el CALCULATE en variables adicionales y luego puede devolver variables individuales como parte de la medida para ver esencialmente lo que está sucediendo dentro en cada paso de la medida.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.