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

Power Query "si condiciona la Ayuda lógica"

Hola Comunidad,

¿Puede revisar a continuación y proporcionar sus sugerencias? Estoy buscando algunas sugerencias usando Power Query.

Fecha (mm/dd/aaaa)

12/22/2020

12/23/2020

12/24/2020

1/2/2021

1/3/2021



Lógica:1
If Date.Month(DateTime.LocalNow())-1 entonces debe mostrar los datos del mes anterior y del año anterior

Fecha (mm/dd/aaaa)

12/22/2020

12/23/2020

12/24/2020


Lógica:2
if Date.Month(DateTime.LocalNow())<>1, entonces debe mostrar solo los datos del mes anterior y el mismo año.

Fecha (mm/dd/aaaa)

1/2/2021

1/3/2021

Si
Date.Month(DateTime.LocalNow())-1

entonces Date.Month ([-"Date(mm/dd/aaaa)"])-1, Date.Year(DateTime.LocalNow())-1

Más

Date.Month(DateTime.LocalNow()),Date.Year(DateTime.LocalNow())

Avísame si necesitas más información.

2 ACCEPTED SOLUTIONS
mahoneypat
Employee
Employee

Parece que solo quieres que el filtro sea para el mes completo anterior. Para ello, simplemente haga clic en la flecha en su columna de fecha y haga un conjunto de fecha codificado de forma rígida eligiendo "Entre". Una vez creado, actualícelo con los cambios de texto rojo a continuación

• Table.SelectRows(''

saludos

palmadita





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

parry2k
Super User
Super User

@tejapowerbi123 solución adjunta, compruebe los pasos en los datos de transformación. Calculé la fecha de inicio y finalización y luego la usé para el filtro. puede ajustar la lógica según sus necesidades.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

@tejapowerbi123 solución adjunta, compruebe los pasos en los datos de transformación. Calculé la fecha de inicio y finalización y luego la usé para el filtro. puede ajustar la lógica según sus necesidades.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

mahoneypat
Employee
Employee

Parece que solo quieres que el filtro sea para el mes completo anterior. Para ello, simplemente haga clic en la flecha en su columna de fecha y haga un conjunto de fecha codificado de forma rígida eligiendo "Entre". Una vez creado, actualícelo con los cambios de texto rojo a continuación

• Table.SelectRows(''

saludos

palmadita





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Hola @mahoneypat y @parry2k ,

Muchas gracias por sus grandes sugerencias. Ambas soluciones están funcionando para mí.

Gracias de nuevo.

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.