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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Kumarcy
Helper II
Helper II

Límite de importación de datos basado en 3 campos en la consulta de energía

Hola usuarios avanzados,

Estoy tratando de importar algunos datos en power bi y me gustaría limitar el número de registros usando 3 campos. a continuación está los datos se ven como.

SesiónSessionmonthFecha de la sesiónCantidad
S-1Noviembre11/5/2020100
S-2Noviembre11/18/2020100
S-3Noviembre12/4/2020100
AdhocNoviembre12/5/2020100
S-1Diciembre12/8/2020100
S-2Diciembre12/20/2020100
S-1Enero1/5/2021100
S-2Enero1/20/2021100
S-3Enero2/1/2021100

Mediante el uso de Session,SessionMonth,SessionDate i desea cargar sólo los datos recientes. Por ejemplo para noviembre me gustaría cargar Adhoc y para diciembre le gustaría cargar S-2 y para enero me gustaría cargar S-3.

Por favor, ayúdenme.

Gracias

3 REPLIES 3
HotChilli
Super User
Super User

Agregue un paso en Power Query:

Table.SelectRows(#"Changed Type", each 
(([Sessionmonth] = "November" and [Session] = "Adhoc") or 
 ([Sessionmonth] = "December" and [Session] = "S-2") or 
 ([Sessionmonth] = "January" and [Session] = "S-3")))

"Tipo cambiado" es el nombre del paso anterior

@HotChilli Gracias por la respuesta. sesión puede ser un cambio para cada mes, no es estático.

Hola @Kumarcy

Para cambiar los valores de sesión dinámicamente, ¿puede utilizar los parámetros de consulta?

112303.jpg

A continuación, haga referencia a los parámetros en el Editor avanzado:

#"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([Sessionmonth] = "November" and [Session] = Session1) or ([Sessionmonth] = "December" and [Session] = Session2) or ([Sessionmonth] = "January" and [Session] = Session3))

Más referencias:

https://www.biinsight.com/power-bi-desktop-query-parameters-part-1/

https://www.biinsight.com/power-bi-desktop-query-parameters-part2-dynamic-data-masking-and-query-par...

Saludos
Equipo de apoyo a la comunidad _ Jing Zhang
Si este post ayuda, considera Aceptarlo como la solución para ayudar a otros miembros a encontrarlo.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.