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.
¡Eh!
Estoy luchando con Power BI para mostrar una tabla con la puntuación del mes actual y el mes anterior.
Mi conjunto de datos de prueba es el siguiente:
Periodo | Valor | Score |
31/08/2022 | A | NoFav |
31/08/2022 | B | Neutral |
31/08/2022 | C | Neutral |
31/08/2022 | D | Neutral |
30/09/2022 | A | Fav |
30/09/2022 | B | NoFav |
30/09/2022 | C | Fav |
30/09/2022 | D | NoFav |
31/10/2022 | A | Fav |
31/10/2022 | B | Fav |
31/10/2022 | C | Fav |
31/10/2022 | D | NoFav |
Y lo que quiero lograr es:
Valor | Periodo | Score | PuntuaciónAnteriorMes |
A | 31/08/2022 | NoFav | |
A | 30/09/2022 | Fav | Nofav |
A | 31/10/2022 | Fav | Fav |
B | 31/08/2022 | Neutral | |
B | 30/09/2022 | NoFav | Neutral |
B | 31/10/2022 | Fav | NoFav |
To calculate the column PuntuaciónAnteriorMes i'm trying with this DAX formula, but it doesn't work and shows blanks instead the values:
ScorePreviousMonth =
MAXX(
FILTER ( ALL('table'), 'table'[Period] = (DATEADD('table'[Period], -1, MONTH )) )
, 'table'[Score]
)
He creado una tabla de calendario y también lo he intentado, pero con el mismo resultado.
ScorePreviousMonth =
MAXX(
FILTER ( ALL('table'), 'table'[Period] = PREVIOUSMONTH('Calendar'[Date] ))
, 'table'[Score]
)
¿Alguna idea?
Gracias de antemano,
Saludos
Hola @N4gash Pruébalo colum
colum =
VAR _max = PREVIOUSMONTH('table'[Period])
return
MAXX(
FILTER (
ALL('table'),
EOMONTH('table'[Period],0) = _max
&& 'Table'[Value] = EARLIER([Value])
)
, 'table'[Score]
)
Gracias @amitchandak !!
He probado tu fórmula (añadiendo "_max" al filtro) pero el resultado sigue siendo erróneo, parece que utiliza el valor máximo de la columna Score:
New col =
var _max = eomonth('table'[Period],-1)
return
MAXX(
FILTER ( 'table', Eomonth('table'[Period],0) = _max)
, 'table'[Score]
)
@N4gash , si necesita una columna
Nuevo col
=
var _max = eomonth('tabla'[Periodo],-1)
devolución
MAXX(
FILTER ( 'tabla', Eomes('tabla'[Período],0) = )
, 'tabla'[Puntuación]
)
para medisure pruebe TI con tabla de fechas
Inteligencia de tiempo, parte de aprender Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Inteligencia de tiempo, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Período personalizado hasta la fecha: https://youtu.be/aU2aKbnHuWs&t=145s
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |