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.
Hola
Quiero crear una medida para calcular el valor Y-1 basado en el Año seleccionado.
Solved! Go to Solution.
Hola @Icey @amitchandak ,
Gracias por su ayuda.
Lo he arreglado por la función allexcept.
Hola @jackwu ,
Prueba esto:
Measure 2 =
CALCULATE (
SUM ( 'Table'[Volumns] ),
FILTER (
ALLSELECTED( 'Table' ),
YEAR ( 'Table'[Date] )
= SELECTEDVALUE ( 'Calendar'[year] ) - 1
&& 'Table'[Type] = "type1"
)
)
Saludos
Icey
Si este post ayuda,entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
Hola @Icey @amitchandak ,
Gracias por su ayuda.
Lo he arreglado por la función allexcept.
@jackwu, ¿quieres año tras año. Si tiene información de tiempo de uso de fecha con tabla de fechas. Si no, entonces tener tabla de años
Con fecha o tabla de año
Este año: CALCULATE(sum('order'[Qty]),filter(ALL('Date'),'Date'[Year]-max('Date'[Year])))
Last Year ? CALCULATE(sum('order'[Qty]),filter(ALL('Date'),'Date'[Year]-max('Date'[Year])-1))
con tabla de fechas
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"))
Este año Ventas: CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR('Date'[Date]),"12/31"))
Ventas del año pasado: CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"12/31"))
Last to last YTD Sales - CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-2,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, únete a ella con la columna de fecha de tus hechos. recomienda:
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
Apreciamos tus Felicitaciones.
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 |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |