Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Anonymous
Not applicable

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.

Anonymous
Not applicable

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors