Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Buenos dias a todos.
Puede ser algo facil pero en este momento me encuentro aprendiendo acerca de Power BI, no se si me podrian ayudar con la siguiente pregunta, tengo los datos de los colores que se generaban mes a mes del 2021 y 2022, tengo que mostrar en una tabla como la siguiente imagen en la cual yo pueda comparar si el color es el mismo en los dos años o son diferentes.
Se que puedo traer los datos del año anterior con la función DATEADD, pero solo logro que funcione para datos numericos por la función CALCULATE.
No se si me podrian hacer el favor de indicarme como realizarlo.
Muchas gracias por su tiempo. Cordial saludo
Solved! Go to Solution.
@Anonymous , Using a date table and time intelligence
YTD = CALCULATE(Max(Table[Status]),DATESYTD('Date'[Date],"12/31"))
Last YTD = CALCULATE(Max(Table[Status]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
Year behind = CALCULATE(Max(Table[Status]),dateadd('Date'[Date],-1,Year))
Year behind = CALCULATE(Max(Table[Status]),SAMEPERIODLASTYEAR('Date'[Date]))
refer if needed
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s
Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA
Hi @Anonymous ,
According to your description, I made a sample and here is my solution.
Sample data:
Create a calculated column to compare two columns.
Column =
IF (
SUMX ( 'Table', SEARCH ( 'Table'[2021], 'Table'[2022], 1, 0 ) ) > 0,
"Yes",
"No"
)
Final output:
I attach my sample below for your reference.
Best Regards,
Community Support Team _ xiaosun
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Using a date table and time intelligence
YTD = CALCULATE(Max(Table[Status]),DATESYTD('Date'[Date],"12/31"))
Last YTD = CALCULATE(Max(Table[Status]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
Year behind = CALCULATE(Max(Table[Status]),dateadd('Date'[Date],-1,Year))
Year behind = CALCULATE(Max(Table[Status]),SAMEPERIODLASTYEAR('Date'[Date]))
refer if needed
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s
Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA