Forum Discussion

Benmorgan86uk's avatar
Benmorgan86uk
New Member
7 years ago
Solved

PowerBI Dyanmic Web Request

Struggling with this one a little bit so hoping someone may be able to shed some light (please be gentle, I am new to PowerBI).

 

I am currently trying to collect data from a web API and feed this into another data collection from web API, for example.

 

I start with a group_id that has a series of user_ids within it, I then want to use these user_ids to collect data for each one.

 

So it certainly feels like a managed parameter, but I want it to collect data for each one (rather than one at a time) so if I get the list of user_ids and convert this to a new query, I can load a managed parameter with this information.

 

However when I attempt to use the managed parameter as part of the web URL I am greeted with "We cannot apply operator & to types Text and Number"

 

This is driving me crazy as I feel like the fix should be pretty simple

  • parry2k's avatar
    parry2k
    7 years ago

    Benmorgan86uk are you open to share small dataset what you are trying to do? may be it is goog candidate to make a function and use that to make it work.

5 Replies

  • Benmorgan86uk seems like you are dynamially merging your user id into your query, can you make sure to change the data type of user id column to text before you concatenate it with web query.

    • Benmorgan86uk's avatar
      Benmorgan86uk
      New Member

      Exactly right, so the exact steps I am taking is I am using the user_id column, adding as a new query, then creating a managed parameter that uses "suggested value = query" then specifying the new query.

       

      Then I go get data, web, advanced, set the first part of the URL, then add the parameter into URL part 2.

       

      The issue I can see is that when I hit Add as new query, it comes up as a list and I can make a parameter around it but cannot convert the data type, if I then convert the query to table, I can no longer use it as a parameter query.

       

      Thanks for your help on this, this is more or less the first day I have started playing with this with any gusto

      • parry2k's avatar
        parry2k
        Icon for Super User rankSuper User

        Benmorgan86uk are you open to share small dataset what you are trying to do? may be it is goog candidate to make a function and use that to make it work.