cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

PowerBI is Converting TRUE / FALSE to -1/0 on publish

I have a table in a report that contains the following column:-

EscSwitch = SWITCH ( 'RISK_TABLE'[ESCALATE], "TRUE", "YES", "FALSE", "NO" ) where the source data is either TRUE, FALSE or null.
 
Adding this column to a table in PowerBI desktop works as expected, the column is populate with YES, NO or some blanks. However, when i publish, this column works initially, then when the page is refreshed or re-opoened, the fild then shows just blanks.
To investigate i have added the RISK_TABLE'[ESCALATE] field to the table. This returns -1 or 0 instead of TRUE or FALSE as contained in the source data.
Why is the service changing TRUE / FALSE to -1/0 on publish?
Screenshots below
Untitled.png
6 REPLIES 6
elallen
Regular Visitor

I encountered the exact same scenario.  My published reports would look fine if I refreshed data using desktop version and then published online.  However, if dataset is refreshed online (manually or scheduled), then the visuals returned with Blank results.  Here's my solution that seems to be working.  Using desktop version,

  1. In Power Query, change the column type to True/False (see screenshot below).
  2. Close and apply.
  3. In each visual, remove any existing use of the original column and replace it with the revised column.
    1. Not sure why I had to do this, but I did.
  4. Save and publish.
  5. Look at report online and it looks fine now.
    1. I tested by refreshing dataset again, but using PowerBI online.
    2. Reports look fine still.

I can't explain why PowerBI is converting the values (doesn't make sense to me!) and I can't explain why my solution is working either, but it is.  I'm going back to my other datasets and applying this solution.  From now on, I will edit all columns containing True/False to use the True/False column type.  Hope this helps!

elallen_0-1663944757092.png

 

mbrewing
Frequent Visitor

Any resolution to this? I'm having this problem and it's breaking my reports daily. There was no issue for about a month and it started all of a sudden.

Checkout my reply posted today... I think it fixed my issue.

AbhiSSRS
Solution Sage
Solution Sage

This issue still persists in service and is not fixed 

v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

Sorry for that, but we cannot reproduce your issue on my side, What is the kind of connection you are using, import or directquery?2.jpg3.jpg4.jpg5.jpg6.jpg

 


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi, this is Microsofr Project Online data accessed by odata.

URL used is https://XXX.sharepoint.com/sites/ppm/_api/Projectdata

Helpful resources

Announcements
Vote for T-Shirt Design

Power BI T-Shirt Design Challenge 2023

Vote for your favorite t-shirt design now through March 28.

March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.

March Events 2023A

March 2023 Events

Find out more about the online and in person events happening in March!

Top Solution Authors