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.
neeHi
¡Espero que algún cuerpo pueda ayudarme!
Tengo 2 tablas, una con fechas y otra con valores, están conectadas.
A continuación, qué calcular la suma del último mes e insertar el valor en una columna y el mismo valor para cada fila.
Así que mis datos podrían parecerse a:
Fecha | Valor |
2020-01-01 | 5 |
2020-01-10 | 8 |
2020-01-15 | 88 |
2020-01-20 | 9 |
2020-01-30 | 55 |
2020-02-08 | 654 |
2020-02-18 | 85 |
2020-02-25 | 1 |
La suma del último mes es 740 Me gustaría tener una nueva columna hay sólo 740 para cada fila. Como abajo
Fecha | Valor | Total |
2020-01-01 | 5 | 740 |
2020-01-10 | 8 | 740 |
2020-01-15 | 88 | 740 |
2020-01-20 | 9 | 740 |
2020-01-30 | 55 | 740 |
2020-02-08 | 654 | 740 |
2020-02-18 | 85 | 740 |
2020-02-25 | 1 | 740 |
Espero que algún cuerpo pueda ayudarme a 🙂
Solved! Go to Solution.
@Snip , Crear una nueva columna como
Column = sumx(FILTER('Table',EOMONTH([date],0) =EOMONTH(max([Date]),0)),[Value])
Hola @Snip ,
Por favor, intente esto:
Measure =
VAR mon_ =
CALCULATE ( MAX ( 'Table'[Date] ), ALLSELECTED ( 'Table' ) )
RETURN
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER (
ALL ( 'Date' ),
'Date'[Month] = MONTH ( mon_ )
&& MAX ( 'Table'[Value] ) <> BLANK ()
)
)
Hola @Snip ,
Por favor, intente esto:
Measure =
VAR mon_ =
CALCULATE ( MAX ( 'Table'[Date] ), ALLSELECTED ( 'Table' ) )
RETURN
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER (
ALL ( 'Date' ),
'Date'[Month] = MONTH ( mon_ )
&& MAX ( 'Table'[Value] ) <> BLANK ()
)
)
@Snip , Crear una nueva columna como
Column = sumx(FILTER('Table',EOMONTH([date],0) =EOMONTH(max([Date]),0)),[Value])
No funciona. ¿Puedes explicar lo que hace?
Remeber tengo una tabla de fechas y una tabla con los valores.
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 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |