Forum Discussion
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.
- The slicer appears as desired in the Desktop application
- Values True and False - with True selected by default.
- (no type changes when refreshing in the Desktop application)
- The slicer appears as desired after initial publish to the service.
- Values True and False - with True selected by default.
- The slicer changes unexpectedly after refresh in the service.
- After the first refresh the column type unexpectedly changes to an integer type.
- 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)
6 Replies
- OwenMITPNew 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?
- OscarHernandezFrequent Visitor
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)- OwenMITPNew Member
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.
- Greg_DecklerCommunity 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". - v-lionel-msftCommunity 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 ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Syed_WasifNew 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