Forum Discussion

AstroBot's avatar
AstroBot
New Member
4 years ago
Solved

Web Contents with dynamic URL API in PowerBI: Strange data fetch behavior when uploaded in the cloud

Hello everyone,

 

I'm actually using a custom query to get data from an API, built around this logic to bypass the automatic actualization problems :


Example:

"Web.Contents(URL,[RelativePath=RelativeUrl,Headers=headers])"

It works perfectly fine in desktop, returning all correct values. But when i publish it to the cloud, it "looks" ok at first, but all "TRUE/FALSE" column are returning weird value.

For instance, in desktop i would get :

OBJECT1FALSE (as text value)
OBJECT2TRUE (as text value)

 

And in cloud i do get with the same query randoms "0" and "-1" :

OBJECT10
OBJECT2-1

 

Thanks for your help,
Regards

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi AstroBot ,

     

    When you create a report in Power BI Desktop that contains an ANY data type column, and that column contains TRUE/FALSE values, the values of that column can differ between the Power BI Desktop and the Power BI service after a refresh. In Power BI Desktop, the underlying engine converts the boolean values to strings, retaining TRUE or FALSE values. In the Power BI service, the underlying engine converts the values to objects, and subsequently converts the values to -1 or 0.

    Visuals created in Power BI Desktop using such columns may behave or appear as designed prior to a refresh event, but may change (due to TRUE/FALSE being converted to -1/0) after the refresh event.

     

    For details, you can refer to Refresh a column of the ANY type containing TRUE/FALSE results in unexpected values 

     

    Hope it helps,

     

    Best Regards,
    Community Support Team _ Caitlyn

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi AstroBot ,

     

    When you create a report in Power BI Desktop that contains an ANY data type column, and that column contains TRUE/FALSE values, the values of that column can differ between the Power BI Desktop and the Power BI service after a refresh. In Power BI Desktop, the underlying engine converts the boolean values to strings, retaining TRUE or FALSE values. In the Power BI service, the underlying engine converts the values to objects, and subsequently converts the values to -1 or 0.

    Visuals created in Power BI Desktop using such columns may behave or appear as designed prior to a refresh event, but may change (due to TRUE/FALSE being converted to -1/0) after the refresh event.

     

    For details, you can refer to Refresh a column of the ANY type containing TRUE/FALSE results in unexpected values 

     

    Hope it helps,

     

    Best Regards,
    Community Support Team _ Caitlyn

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

    • AstroBot's avatar
      AstroBot
      New Member

      Hello,

      It did the trick, i changed the value prior upload to data type : TRUE/FALSE, and changed related DAX formula to work with this type as well.

      Worked like a charm.

      Thanks !
      Regards