Forum Discussion

mr_wizard's avatar
mr_wizard
Resolver I
3 years ago
Solved

report refresh not working for SharePoint Online data source

I have a report created in Power BI Desktop that sources from a SharePoint Online list.  I successfully published it to the Power BI service and have set up a refresh schedule for it.  The refresh hi...
  • mr_wizard's avatar
    3 years ago

    I figured out the cause of my problem.  I'm helping out a colleague in this report, i.e., it's not mine.  I wasn't aware of a piece of code in it that is dependent on a field that is behaving differently in PBI Service than in PBI Desktkop.  The SPO list that this report sources from contains file attachments.  The report tests for the presence of attachments.  When the list is read in, it pulls the Attachments metadata field from SPO, which is a logical (TRUE/FALSE) data type in SPO.  My colleage didn't explicitly cast it.  So, it gets implicitly cast to a text data type in PBI.  PBI Desktop maps TRUE to True and FALSE to False in that casting.  But, PBI Service maps TRUE to -1 and FALSE to 0 in that casting.  This behavior difference between Desktop and Service was resulting in the report appearing as though it wasn't refreshing.  So, it's not a SPO-PBI problem after all.  Rather, it's a code problem, which resulted from the unexpected behavior difference between Desktop and Service.