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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Trailbear
Microsoft Employee
Microsoft Employee

Boolean converted to Integer on refresh in Service

We have a report with a slicer on a Boolean typed column which publishes as it appears in the desktop app, but changes to an integer type after the data is refreshed in the service. 

The first occurrence of this behavior was noticed on February 12th, 2020.  It persists today February 28th, 2020.

Details and images below. 

 

  1. The slicer appears as desired in the Desktop application 
    1. Values True and False - with True selected by default.
    2. (no type changes when refreshing in the Desktop application)
  2. The slicer appears as desired after initial publish to the service.
    1. Values True and False - with True selected by default. 
  3. The slicer changes unexpectedly after refresh in the service.
    1. After the first refresh the column type unexpectedly changes to an integer type. 
    2. Now showing -1 as selected (True) and the data values are 0 and 1. 

 

The Boolean column "Current Staff" is calculated from a SQL bit column ("Is_Terminated"), using a DAX formula to invert the value.  Snip of the DAX below 

  • #"Added Conditional Column" = Table.AddColumn(#"Renamed Columns", "Current Staff", each if [Is_Terminated] = true then false else true)
  • FYI: We have tried changing case of the true/false values but the desktop editor changes them back to all lower
  • FYI: The SQL column is actually not accurately named... but does show if the person is not found in a specific data source, a nuance that needs to be masked more gracefully in the report)

 

PBI_BooleanSlicer_Desktop.jpgPBI_BooleanSlicer_AfterPublish.jpgPBI_BooleanSlicer_AfterRefresh.jpg
6 REPLIES 6
OwenMITP
New Member

This still appears to be an issue today. I have experienced exactly the same behaviour as OP on multiple reports, does anyone have a fix/workaround?

@OwenMITP are you having issues with filters or with measures? 

If you are having problems with measures, can you please double check if your DAX queries include something like:

IF([BooleanColumn] = "TRUE", X, Y)

IF([BooleanColumn] = "FALSE", A, B)

 If so, you could change your measures to use the boolean values of said columns instead of their literal value. Following the previous example, you could change your DAX measures to:

IF([BooleanColumn], X, Y)

IF(NOT([BooleanColumn]), A, B)

 

No issues with Measures, only with columns that show as boolean with values true/false in PBIX and -1/1 when published to powerbi web.

Syed_Wasif
New Member

I am experiencing the same issue, was this resolved? The Power Query M line that produces the values for this column is as follows:
Table.AddColumn(#"Filtered Rows1", "CurrentStateView", each if [CurrentState] <> "Inactive" then true else false)

 

While this works like charm in Power BI Desktop and I can see values like TRUE and FALSE for that column. Even after I publish to the service and visualize, I see the values as TRUE and FALSE. But as soon as the Power BI service refreshes the data set, the values become something like 0 and -1. Strange, still looking for help

v-lionel-msft
Community Support
Community Support

Hi @Trailbear ,

 

I followed your steps to do the test, but I can't reproduce your issue, please create support ticket .

 

Best regards,
Lionel Chen

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

Greg_Deckler
Community Champion
Community Champion

Man, scores of refresh issues going on today. Wonder if there is some update going on in the Service.  You could check the Issues forum here:

https://community.powerbi.com/t5/Issues/idb-p/Issues

And if it is not there, then you could post it.

If you have Pro account you could try to open a support ticket. If you have a Pro account it is free. Go to https://support.powerbi.com. Scroll down and click "CREATE SUPPORT TICKET".



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.