Forum Discussion
Added column on query not right
hello, guys.
I have a very strange issue happening on my data on the PBI query. I am trying to construct a new database from a previous one. To do that I am using the query of PBI to calculate everything I need. Most of the calculations is to add 2 or 3 columns. But for some reason they are not right when I use the query, but they are right when I add a calculate column direct on the visualization. Just to make sure it is clear the following image show two columns, both are the sum of two other columns, so the columns I am showing are A+B. The column "Added Table on Query" was created as an added column ON THE QUERY and the "Calculated column" was created as a new column direct on the tables on fields on the visualization of PBI. I really do not understand why the total are different. What is happening?
Phil_Seamark. I don´t think this is the problem. Anyway I found out what was heppening. On the Query Editor there where cells with "null", even with the type being number, it was not making the additions. So, A(with nulls)+B = C(with nulls) and the nulls were not showing on the visualizations. After I replaced the nulls by 0, stared to work. Don´t know exactly why
2 Replies
- Phil_SeamarkMicrosoft Employee
HI BrunaSeixas
Could it be a datatype/rounding problem? Is one data source using Decimals, while the other is just using Whole Numbers?
- BrunaSeixasFrequent Visitor
Phil_Seamark. I don´t think this is the problem. Anyway I found out what was heppening. On the Query Editor there where cells with "null", even with the type being number, it was not making the additions. So, A(with nulls)+B = C(with nulls) and the nulls were not showing on the visualizations. After I replaced the nulls by 0, stared to work. Don´t know exactly why