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
ppraveenk
Frequent Visitor

Agregar valores predeterminados a parámetros en la tabla de navegación

Hola Expertos,

Estoy intentando agregar parámetros de fechas de inicio y finalización a una tabla de navegación con valores predeterminados como fecha de hoy para un connetor de datos para que el usuario pueda proporcionar valores al cargar datos. ¿Puede alguien por favor proporcionar punteros cómo lograr esto a través del lenguaje M. Lo que sigue es lo que logré lograr hasta ahora. Puedo ver los campos de entrada startDate y endDate donde el usuario puede introducir valores. Pero no se pudo lograr mostrar los valores predeterminados en esos campos de entrada.

También cómo pasamos una lista de valores a un parámetro en la tabla de navegación.

Dejar
fuente: #table('Nombre", 'Datos", "ItemKind", "ItemName", "IsLeaf"',
• "UserSearch", (startDate as text, endDate as text) ?> GetUserSearchTable(startDate, endDate), "Table", "Table", true ?
• "Usuarios", GetUsersTable(), "Tabla", "Tabla", verdadero
}),
navTable ? Table.ToNavigationTable(source, '"Name"', "Name", "Data", "ItemKind", "ItemName", "IsLeaf")
En
navTable;

GetUserSearchTable (startDate as text, endDate as text) como tabla ?>
Dejar
cuerpo : ""endDate"" : """&endDate&""" , ""startDate"" : """&startDate&"""""
fuente: Web.Contents("https://rest.api/users", [ RelativePath á "search", Content á Text.ToBinary(body)]),
json - Json.Document(source),
"Convertido en tabla" - Record.ToTable(json),
Valor "Convertido en tabla"{0}[Valor],
"Convertido a La Tabla1" - Table.FromList(Value, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
"Columna expandida1" - Table.ExpandRecordColumn('Converted to Table1', 'Column1', '"userID"', ''userID''),
"Columnas renombradas" - Table.RenameColumns(''Columna expandida1',''userID', 'Id''),
"Función personalizada invocada" - Table.AddColumn(-"Renamed Columns", "GetListTable", each GetListTable([Id])),
"Usuarios expandidos" - Table.ExpandTableColumn('Función personalizada invocada", "GetListTable", ''name"', 'type', '''nombre"', 'type'')
En
"Usuarios expandidos";

4 REPLIES 4
parry2k
Super User
Super User

@ppraveenk No creo que haya una manera de establecer el valor predeterminado de los parámetros en la fecha de hoy.

Me gustaría elogiossi mi solución ayudara.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para dar a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!

Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionados con Power BI.



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.

Hola @parry2k gracias por su respuesta. He visto esto posible en uno de los conectores. Pfb

Si no es fecha, ¿podemos mostrar algún texto predeterminado? ¿Cómo establecemos algo como valor predeterminado y pas la lista a un prameter. He pasado por muchos foros, pero no he encontrado ninguna pista sobre esto.

ppraveenk_0-1594709860963.png

Estoy buscando algunas entradas para establecer vaulue predeterminado en un campo de parámetro de texto. Cualquier puntero sería muy útil.

Hola @ppraveenk

si abre su consulta en el editor avanzado, ¿cómo se ve

Salud
Sturla

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.