Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Querida comunidad
Tengo un problema con Formula.Firewall. Realizo una primera solicitud donde reúno todas las ofertas de pipedrive (pipedrive_deals). Luego, en la segunda solicitud, quiero usar la columna deal_id de las ofertas de pipedrive para luego realizar la segunda solicitud para tomar la información del producto de cada ID de transacción (cada fila de otra tabla)
Request 1: Request all dealsSolicitud 1: Solicitar todas las ofertas
Request 2: Request product for each deal_idSolicitud 2: Solicite producto para cada deal_id
Sin embargo, recibo un error de Formula.Firewall: La consulta 'Product_request_basic' (paso 'Columna extendida1') se refiere a otras consultas o pasos y, por lo tanto, no puede acceder directamente a una fuente de datos. Vuelva a crear esta combinación de datos.
Sin embargo, si solo inserto el deal_id directamente, obtengo acceso a él. Pero quiero tenerlo de forma dinámica y dependiendo de la primera petición.
¿Puede alguien ayudarme, por favor? Lo intenté mucho y no encontré ninguna solución... también bastante nuevo en Power BI.
¡Gracias de antemano! 🙂
Marco
Su identificador debe colocarse en RelativePath y el api_token en la parte de consulta de Web.Contents
Y esta es la consulta que se refiere a la consulta anterior, sacando el deal_ids
//basic code
let
apiUrl = "https://hello.world.com/v1/deals/",
apiToken = "1234",
idsTable = Pipedrive_deals,
ids = Table.Column(idsTable, "deal_id"),
#"Entfernte alternative Elemente" = List.Alternate(ids,200,40,0),
//ids = {"4334", "4237", "4223", "4222"}, // replace with your own list of IDs --> Pipedrive[id]
getApiResults = (id) =>
let
apiEndpoint = apiUrl & id & "/products?api_token=" & apiToken,
apiResult = Web.Contents(apiEndpoint),
jsonResult = Json.Document(apiResult),
data = jsonResult[data]
in
data,
results = List.Transform(#"Entfernte alternative Elemente", each getApiResults(_)),
filteredResults = List.RemoveNulls(results),
resultsTable = Table.FromColumns(filteredResults),
#"Transponierte Tabelle" = Table.Transpose(resultsTable),
#"Erweiterte Column1" = Table.ExpandRecordColumn(#"Transponierte Tabelle", "Column1", {"id", "deal_id", "product_id"}, {"Column1.id", "Column1.deal_id", "Column1.product_id"})
in
#"Erweiterte Column1"
//This first part will get all the total deal records
let
Source = Json.Document(Web.Contents("https://hello.world.com/v1/deals?api_token=1234",[Query=[api_token="1234", limit="1", start="0", get_summary="1"]])),
#"Converted to Table Record" = Record.ToTable(Source),
Value = #"Converted to Table Record"{2}[Value],
summary = Value[summary],
total_records = summary[total_count],
//This second part, tries to resolve the maximum limit value of 500 that pipedrive have
//Starts 0, 500, 1000, 1500 until the total records
Starts = List.Generate(()=>0, each _ < total_records, each _ + 500),
#"Converted to Table" = Table.FromList(Starts, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Changed Type" = Table.TransformColumnTypes(#"Converted to Table",{{"Column1", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Json.Document(Web.Contents("https://hello.world.com/v1/deals?api_token=1234",[Query=[api_token="1234", limit="500", start=[Column1]]]))),
//then is just branding and expanding
#"Expanded Custom" = Table.ExpandRecordColumn(#"Added Custom", "Custom", {"data"}, {"Custom.data"}),
#"Expanded Custom.data" = Table.ExpandListColumn(#"Expanded Custom", "Custom.data"),
#"Expanded Custom.data1" = Table.ExpandRecordColumn(#"Expanded Custom.data", "Custom.data", {"stage_id", "title", "status", "won_time", "owner_name", "value", "products_count", "last_activity_id", "org_id", "id"}),
#"Neu angeordnete Spalten" = Table.ReorderColumns(#"Expanded Custom.data1",{"id", "Column1", "stage_id", "title", "status", "won_time", "owner_name", "value", "products_count", "last_activity_id", "org_id"}),
#"Erweiterte org_id" = Table.ExpandRecordColumn(#"Neu angeordnete Spalten", "org_id", {"address"}, {"org_id.address"}),
#"Gefilterte Zeilen1" = Table.SelectRows(#"Erweiterte org_id", each ([status] = "won")),
#"Entfernte Spalten" = Table.RemoveColumns(#"Gefilterte Zeilen1",{"Column1"}),
#"Sortierte Zeilen" = Table.Sort(#"Entfernte Spalten",{{"stage_id", Order.Ascending}}),
#"Gefilterte Zeilen" = Table.SelectRows(#"Sortierte Zeilen", each true),
#"Geänderter Typ" = Table.TransformColumnTypes(#"Gefilterte Zeilen",{{"id", type text}}),
#"Umbenannte Spalten" = Table.RenameColumns(#"Geänderter Typ",{{"id", "deal_id"}}),
#"Gefilterte Zeilen2" = Table.SelectRows(#"Umbenannte Spalten", each true),
#"Geänderter Typ1" = Table.TransformColumnTypes(#"Gefilterte Zeilen2",{{"value", Int64.Type}}),
#"Gefilterte Zeilen3" = Table.SelectRows(#"Geänderter Typ1", each true)
in
#"Gefilterte Zeilen3"Así que esta es la consulta de donde estoy tomando los deal_id
Gracias por haber visto el video. Sin embargo, después de intentarlo mucho, todavía no logré hacerlo. ¿Puedes de alguna manera darme una pista en forma de código para integrar en una partición?
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.