Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
mohammedmqi
Regular Visitor

el valor de diferencia entre año

hola a todos

Soy newbi en power bi

tienen esta mesa

mohammedmqi_1-1603106156483.png

así que lo cambio a la matriz a

mohammedmqi_2-1603106247456.png

y ahora necesito mostrar la diferencia entre 2019 y 2020 rahter que toatal becuse no necesito total

(differenceValue-2020-2019)

¿cómo puedo hacer eso?!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@mohammedmqi , crear una tabla de año/fecha separada y usar una fórmula como esta

Este año: CALCULATE(sum('Table'[Amount]),filter(ALL('Date'),'Date'[Year]-max('Date'[Year])))
Last Year ? CALCULATE(sum('Table'[Amount]),filter(ALL('Date'),'Date'[Year]-max('Date'[Year])-1))

diff -Este año]-[Año pasado]
diff % á divide([This Year]-[Last Year ],[Last Year ])

Proporcione sus comentarios y consejos para nuevos videos
Tutorial Series Dax Vs SQL Direct Query PBI Consejos
Apreciamos tus Felicitaciones.

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@mohammedmqi , crear una tabla de año/fecha separada y usar una fórmula como esta

Este año: CALCULATE(sum('Table'[Amount]),filter(ALL('Date'),'Date'[Year]-max('Date'[Year])))
Last Year ? CALCULATE(sum('Table'[Amount]),filter(ALL('Date'),'Date'[Year]-max('Date'[Year])-1))

diff -Este año]-[Año pasado]
diff % á divide([This Year]-[Last Year ],[Last Year ])

Proporcione sus comentarios y consejos para nuevos videos
Tutorial Series Dax Vs SQL Direct Query PBI Consejos
Apreciamos tus Felicitaciones.

gracias por la respuesta

yo uso esto para este yaer

This Year = CALCULATE(sum(GENERALJOURNALACCOUNTENTRY[AMOUNT]),filter(ALL(GENERALJOURNALACCOUNTENTRY[DateGJ].[Year]),GENERALJOURNALACCOUNTENTRY[DateGJ].[Year]=max(GENERALJOURNALACCOUNTENTRY[DateGJ].[Year])))

y este último año

Last Year = CALCULATE(sum(GENERALJOURNALACCOUNTENTRY[AMOUNT]),filter(ALL(GENERALJOURNALACCOUNTENTRY[DateGJ]),GENERALJOURNALACCOUNTENTRY[DateGJ]=max(GENERALJOURNALACCOUNTENTRY[DateGJ])-1))

por lo que tengo que volver a buscar el este cálculo para asegurarse de que

Volveré después de eso

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.