Forum Discussion
Problem With Decimals in Calculated Column with If >=
- 6 years ago
Solved! (Though I may have created further headaches later on.)
So I think the problem was that the region settings on my previous laptop were different. I imported the data from an Oracle database on the previous machine. And I started cleaning and structuring the data and creating the report on that machine. That machine crashed, and I do not remember the region settings.
The new machine has been running with Windows set to English (US). I downloaded Power BI Desktop to my new machine and opened the pbix file wthout taking regions into consideration. Everything worked fine for several weeks until I included a decimal in a function.
To solve the problem, I have been messing around with various combinations of region settings across Windows and PowerBi.
This is the combination that finally worked:
1) Dates and numbers are formatted for Central Europe in the database.
2) The file is set to Italian (Italy) in PowerBI.
3) The global application language is set to Windows default..
4) The global model language is set to English (US).
5) Windows is set to Engish (US).
6) But I have customized the number format for Windows to match European format.
I do not know why, but setting the region for Windows to Italian (Italy) did not do the trick. I had to keep it set to English (US) and then customize the number format for Europe.
Oh, and here is the real kicker. After doing all of this, I have to type "0.745" in the function. But thee column results for decimals appear with the European commas. And in my visuals, it is back to US formatting.
I am satisfied with this result. But I am very scared to open some of my Excel files and find out how they are responding to the new number format. Perhaps I will have to keep switching it depending on which application/files I open.
Best
D
- MJEnnis6 years ago
Resolver III
So I realized that the model was set to English (US) and the file was set to Italian (Italy).
I have changed the model to Italian (Italy), saved, closed, and reopened. But nothing changes. In fact, it says you cannot change the global setting for the model after you have created the report.
Perhaps when I got a new work computer and installed PowerBI, it got confused. The current machine is set to English (US). Maybe the old one was set to Italian...
- MJEnnis6 years ago
Resolver III
Solved! (Though I may have created further headaches later on.)
So I think the problem was that the region settings on my previous laptop were different. I imported the data from an Oracle database on the previous machine. And I started cleaning and structuring the data and creating the report on that machine. That machine crashed, and I do not remember the region settings.
The new machine has been running with Windows set to English (US). I downloaded Power BI Desktop to my new machine and opened the pbix file wthout taking regions into consideration. Everything worked fine for several weeks until I included a decimal in a function.
To solve the problem, I have been messing around with various combinations of region settings across Windows and PowerBi.
This is the combination that finally worked:
1) Dates and numbers are formatted for Central Europe in the database.
2) The file is set to Italian (Italy) in PowerBI.
3) The global application language is set to Windows default..
4) The global model language is set to English (US).
5) Windows is set to Engish (US).
6) But I have customized the number format for Windows to match European format.
I do not know why, but setting the region for Windows to Italian (Italy) did not do the trick. I had to keep it set to English (US) and then customize the number format for Europe.
Oh, and here is the real kicker. After doing all of this, I have to type "0.745" in the function. But thee column results for decimals appear with the European commas. And in my visuals, it is back to US formatting.
I am satisfied with this result. But I am very scared to open some of my Excel files and find out how they are responding to the new number format. Perhaps I will have to keep switching it depending on which application/files I open.
- Anonymous6 years agoNot applicableYou can create a batch/PowerShell file that will switch between the regional settings of your Windows, so you don't have to do it manually.
Best
D