March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
¿Cómo puedo hacer para saber cuál es la temporada subsecuente basándose en la fecha?
Tengo una tabla de esta forma:
Campo | Temporada | Fecha de Inicio |
01 | Temp1 | 10/03/2024 |
01 | Temp2 | 20/04/2024 |
01 | Temp5 | 05/10/2024 |
03 | Temp2 | 15/04/2024 |
03 | Temp3 | 10/10/2024 |
El resultado que estoy esperando:
Campo | Temporada | Fecha de inicio | Temporada Subsecuente | Fecha de inicio de la temporada subsecuente | Fin de la Temporada |
01 | Temp1 | 10/03/2024 | Temp2 | 20/04/2024 | 19/04/2024 |
01 | Temp2 | 20/04/2024 | Temp5 | 05/10/2024 | 04/10/2024 |
01 | Temp5 | 05/10/2024 | Temporada Vigente | Today() | Today()-1 |
03 | Temp2 | 15/04/2024 | Temp3 | 15/04/2024 | 14/04/2024 |
03 | Temp3 | 10/10/2024 | Temporada Vigente | Today() | Today()-1 |
Ya he probado algunas soluciones, como por ejemplo MINX(), el problema es que para cada campo ella devuelve todas las temporadas, por más que sea NULL.
Mi idea es determinar el rango de fechas de las temporadas, que va desde el primer registro de la temporada "x" hasta un día antes del primer registro de la temporada "y". Quiero hacer eso para determinar cuántos eventos climáticos sucedieron en cada temporada.
Solved! Go to Solution.
Hi lbendlin ,thanks for the quick reply, I'll add more.
Hi @MaiconJ97 ,
Please check the attachment for details.
Best Regards,
Wenbin Zhou
Hi lbendlin ,thanks for the quick reply, I'll add more.
Hi @MaiconJ97 ,
Please check the attachment for details.
Best Regards,
Wenbin Zhou
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
Thank you. I have already modified it following the recommendations.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
User | Count |
---|---|
27 | |
15 | |
14 | |
10 | |
10 |
User | Count |
---|---|
38 | |
34 | |
30 | |
13 | |
13 |