

When specifying a number format, you can select from a set of The if statement will then use the da-DK culture if the SalesValue contains a comma.You can specify the format for numeric values that display in your viz, including measures, dimensions, parameters, calculated fields, and axis labels. Text.Contains(#”Promoted Headers”, “,”) then “da-DK” else “en-US”) To check whether the Sales Value contains a comma – we can use the Text.Contains functionĪnd we can refer to the first value in the SalesValue column like this The step before we “Changed Type” is called “Promoted Headers” In this case I know that the column SalesValue will either contain a comma or a dot – and by checking the first value of the file imported I can select which culture to use – this can be done like this So how can we make Power Query dynamically determine which local to use ? – and we have to tell Power Query that the source is from another Culture – so I click EditĪs we can see from the documentation Table.TransformColumnTypes – the function has an optional parameter called Culture –Īnd by adding “en-US” to our formula bar we can have the right value in the SalesValue columnīut when we use this when importing a file where the sales value is formatted with a, as the decimal separator and we use the same culture value (“en-US”) then we have the problem.Īnd by changing the culture to da-DK it shows the right values Let’s try and open the SalesWithDot.csv file in Power BI DesktopĪs my Power BI Desktop uses Danish settings and danes uses, as a decimal separator Power BI desktop will think the values is 30.000 instead of 300 etc.
#EASY CSV EDITOR CHANGE DECIMAL PLACES CODE#
This meant that when importing the different files, I had to find a way to dynamically change the culture code setting when importing the file. For some reason sometimes the data comes with a, (comma) as the decimal separator and other times with. Recently I have been working on a project where the solution should import a csv file exported from a SQL server. Quick #PowerQuery trick – Get duration days between two dates.#PowerQuery - Replicate doing an Excel VLOOKUP in M.
#EASY CSV EDITOR CHANGE DECIMAL PLACES HOW TO#

As you might have seen Using Field Parameters when connecting to a #PowerBI dataset or Azure Analysis Services And one trick I noticed Alex used was something I didn’t know about Power Query and had annoyed me for a long time. This week I watched the video from Guy in A cube with Patrick and Alex Powers – You thought DAX? Alex shows you Dynamic M-M-Magic! – YouTube. The code has been changed compared to #PowerQuery – Convert a referenced query column to a table without Table.FromList() – Magic trick So I have made a Power Point file with the code included and a small instruction on how to use it. Yesterday I posted an image of some PowerPoint VBA code on LinkedIn and Twitter and a lot of people have asked for a copy of the code.

We have build our own CRM system using a Model driven #PowerBI Convert all Power BI links in Power Point to images Now our commercial managers do not have access to e-conomic but they do need the information about what is invoiced to our customers. In my company we use e-conomic as our ERP system and it is also used to send invoices to our customers.

Start by selecting both columns and under the #PowerAutomate – Get a copy of an invoice from your E-conomic system Let’s imagine your data contains two columns with year and the month name and you want to create a date column. Here is another example that might help you. Sometimes it’s the little things that can help you minimize the number of steps in your Power Queries. #PowerQuery – Create a date column from Year number and a month name
