Forum Discussion

Bokangmaela's avatar
Bokangmaela
Helper I
3 years ago
Solved

Power BI Custom connector

Good day,    I have built a custom connector in visual studio to connect to a custom datasource. I am however struggle adding and IF statement in the function as I see that it indicates an error wh...
  • v-jingzhang's avatar
    3 years ago

    Hi Bokangmaela 

     

    Try changing the first statement into below:

     

    samplecount = If count < 1 then 1 else count,

     

    The second statement also has an error. Web.Contents function expects to have a record parameter after the url. The samplecount should be passed to a valid field in the record. Web.Contents - PowerQuery M | Microsoft Learn

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.