Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hola equipo,
puede cualquiera por favor me ayude a convertir este cálculo a continuación tableau en Power BI DAX,
Tendencia
IF (ZN([No_of_call]) - LOOKUP(ZN([No_of_call]), -1)) / ABS(LOOKUP(ZN([No_of_call]), -1)) > 0 ENTONCES
'Rojo'
ELSEIF (ZN([No_of_call]) - LOOKUP(ZN([No_of_call]), -1)) / ABS(LOOKUP(ZN([No_of_call]), -1)) - 0 ENTONCES
'Amarillo'
ELSEIF (ZN([No_of_call]) - LOOKUP(ZN([No_of_call]), -1)) / ABS(LOOKUP(ZN([No_of_call]), -1)) < 0 THEN
'Verde'
Final
@Mahmoodul , creo que en la búsqueda tableau se utiliza para buscar la última fila (si el desplazamiento es 1). Power bi a partir de ahora no admite operaciones de fila.
Así que en caso de que necesite tiempo, necesita usar inteligencia de tiempo con tabla de fechas
Ventas MTD: CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
Last MTD Sales - CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
Ventas de QTD: CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(('Date'[Date])))
Last QTD Sales ? CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-1,QUARTER)))
Ventas YTD á CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales á CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
Para obtener lo mejor de la función de inteligencia del tiempo. Asegúrese de que tiene un calendario de fechas y que se ha marcado como la fecha en la vista de modelo. Además, únase a ella con la columna de fecha de su hecho/ s. Consulte: https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
@Mahmoodul No estoy familiarizado con BUSCAR lo que hace, tal vez FILTER o LOOKUPVALUE? Tampoco está muy familiarizado con la función ZN. Debe ser algo en la línea de esto:
Column =
VAR __Index = [Index]
VAR __ZNCall = IF(ISBLANK([No_of_call]),0,[No_of_call])
VAR __PreviousCall = MAXX(FILTER('Table',__Index - 1),[No_of_call])
VAR __PreviousZNCall = IF(ISBLANK(__PreviousCall),0,__PreviousCall)
RETURN
SWITCH(TRUE(),
(__ZNCall - __PreviousZNCall)/ABS(__PreviousZNCall) > 0,"Red",
(__ZNCall - __PreviousZNCall)/ABS(__PreviousZNCall) = 0,"Yellow",
"Green"
)
Podría ser más fácil publicar datos de muestra y salida esperada.