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.
Puse la siguiente fórmula
Solved! Go to Solution.
@HarshaTNH Puede encontrar esto útil - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000
También, ver si mi Inteligencia del Tiempo el Camino Duro proporciona una manera diferente de lograr lo que está buscando.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...
No es realmente suficiente información para seguir adelante, por favor primero compruebe si su problema es un problema común enumerado aquí: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Además, consulte este post sobre cómo obtener respuesta a su pregunta rápidamente: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Las partes más importantes son:
1. Datos de muestra como texto, utilice la herramienta de tabla en la barra de edición
2. Salida esperada de los datos de muestra
3. Explicación en palabras de cómo obtener de 1. a 2.
Hola, @HarshaTNH
Según su descripción, creé datos para reproducir su escenario. Los archivos pbix se adjuntan al final.
Mesa:
Puede crear medidas como se indica a continuación.
Previous Month Customer =
var tab =
SUMMARIZE(
'Table',
'Table'[Customer],
"Result1",
CALCULATE(
SUM('Table'[Sales Value]),
FILTER(
ALL('Table'),
'Table'[Customer]=EARLIER('Table'[Customer])&&
MONTH('Table'[Sale Date])=MONTH(TODAY())-1
)
)
)
return
SUMX(
tab,
[Result1]
)
Current Month Customer =
var tab =
SUMMARIZE(
'Table',
'Table'[Customer],
"Result2",
CALCULATE(
SUM('Table'[Sales Value]),
FILTER(
ALL('Table'),
'Table'[Customer]=EARLIER('Table'[Customer])&&
MONTH('Table'[Sale Date])=MONTH(TODAY())
)
)
)
return
SUMX(
tab,
[Result2]
)
Difference Customer =
var tab =
SUMMARIZE(
'Table',
'Table'[Customer],
"Result1",
CALCULATE(
SUM('Table'[Sales Value]),
FILTER(
ALL('Table'),
'Table'[Customer]=EARLIER('Table'[Customer])&&
MONTH('Table'[Sale Date])=MONTH(TODAY())-1
)
),
"Result2",
CALCULATE(
SUM('Table'[Sales Value]),
FILTER(
ALL('Table'),
'Table'[Customer]=EARLIER('Table'[Customer])&&
MONTH('Table'[Sale Date])=MONTH(TODAY())
)
)
)
return
SUMX(
tab,
[Result2]-[Result1]
)
%Change Customer =
var tab =
SUMMARIZE(
'Table',
'Table'[Customer],
"Result1",
CALCULATE(
SUM('Table'[Sales Value]),
FILTER(
ALL('Table'),
'Table'[Customer]=EARLIER('Table'[Customer])&&
MONTH('Table'[Sale Date])=MONTH(TODAY())-1
)
),
"Result2",
CALCULATE(
SUM('Table'[Sales Value]),
FILTER(
ALL('Table'),
'Table'[Customer]=EARLIER('Table'[Customer])&&
MONTH('Table'[Sale Date])=MONTH(TODAY())
)
)
)
return
SUMX(
tab,
DIVIDE(
[Result2]-[Result1],
[Result1]
)
)
Previous Month Product =
var tab =
SUMMARIZE(
'Table',
'Table'[Product],
"Result1",
CALCULATE(
SUM('Table'[Sales Value]),
FILTER(
ALL('Table'),
'Table'[Product]=EARLIER('Table'[Product])&&
MONTH('Table'[Sale Date])=MONTH(TODAY())-1
)
)
)
return
SUMX(
tab,
[Result1]
)
Current Month Product =
var tab =
SUMMARIZE(
'Table',
'Table'[Product],
"Result2",
CALCULATE(
SUM('Table'[Sales Value]),
FILTER(
ALL('Table'),
'Table'[Product]=EARLIER('Table'[Product])&&
MONTH('Table'[Sale Date])=MONTH(TODAY())
)
)
)
return
SUMX(
tab,
[Result2]
)
Difference Product =
var tab =
SUMMARIZE(
'Table',
'Table'[Product],
"Result1",
CALCULATE(
SUM('Table'[Sales Value]),
FILTER(
ALL('Table'),
'Table'[Product]=EARLIER('Table'[Product])&&
MONTH('Table'[Sale Date])=MONTH(TODAY())-1
)
),
"Result2",
CALCULATE(
SUM('Table'[Sales Value]),
FILTER(
ALL('Table'),
'Table'[Product]=EARLIER('Table'[Product])&&
MONTH('Table'[Sale Date])=MONTH(TODAY())
)
)
)
return
SUMX(
tab,
[Result2]-[Result1]
)
%Change Product =
var tab =
SUMMARIZE(
'Table',
'Table'[Product],
"Result1",
CALCULATE(
SUM('Table'[Sales Value]),
FILTER(
ALL('Table'),
'Table'[Product]=EARLIER('Table'[Product])&&
MONTH('Table'[Sale Date])=MONTH(TODAY())-1
)
),
"Result2",
CALCULATE(
SUM('Table'[Sales Value]),
FILTER(
ALL('Table'),
'Table'[Product]=EARLIER('Table'[Product])&&
MONTH('Table'[Sale Date])=MONTH(TODAY())
)
)
)
return
SUMX(
tab,
DIVIDE(
[Result2]-[Result1],
[Result1]
)
)
Resultado:
Saludos
Allan
Si este post ayuda,entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
@HarshaTNH, mejor cronor mucho tiempo de inteligencia con tabla de fechas.
Ejemplos
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))
last MTD (complete) Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))
last year MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-12,MONTH)))
last year MTD (complete) Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-12,MONTH))))
Month behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Month))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
Next month value = CALCULATE(sum('table'[total hours value]),nextmonth('Date'[Date]))
diff = [MTD Sales]-[last MTD Sales]
diff % = divide([MTD Sales]-[last MTD Sales],[last MTD Sales])
Power BI — YTD
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
Power BI — QTD
https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839
Power BI — MTD
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
En caso de que no tenga una fecha, pruebe el mismo enfoque que una semana, creando rango en el mes año
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/s hecho/s. Consulte:
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
Vea si mi seminario web sobre Time Intelligence puede ayudar: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...
Apreciamos tus Felicitaciones.
@HarshaTNH Puede encontrar esto útil - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000
También, ver si mi Inteligencia del Tiempo el Camino Duro proporciona una manera diferente de lograr lo que está buscando.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...
No es realmente suficiente información para seguir adelante, por favor primero compruebe si su problema es un problema común enumerado aquí: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Además, consulte este post sobre cómo obtener respuesta a su pregunta rápidamente: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Las partes más importantes son:
1. Datos de muestra como texto, utilice la herramienta de tabla en la barra de edición
2. Salida esperada de los datos de muestra
3. Explicación en palabras de cómo obtener de 1. a 2.
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 |