Power BI Desktop doesn't honor percentage column type - powerbi

I've imported data (approximately 200 columns) into Power BI desktop (latest version as of 2017-08-02) and have explicitly told the app to treat a number of columns as being percentages. Within the query editor, I can verify that my values are treated as such:
When I put my data into a table, they show up as normal floats, not percentages. When I click on the exact same column as in the above picture and view it in the Modeling tab, Power BI shows it as being "General" format:
While I can go through and change the formatting here to have them all be percentages, I have already done so in the query editor! Is there a way to make PBI recognize my already specified format?

Short answer: No.
Explanation:
In the query editor, you didn't actually specify any format. What you specified is the data type, so that the source data can be read correctly. Say you have a column with data like 001, you can specify it as text type so you can retain the leading zero.
However, the actual formatting (i.e. data presentation) is done in your second step, because even if it's a (decimal) number, you can still format it as a percentage, with different decimal places, etc. (vice versa)

Related

Query small decimals into PowerBI

Is there any way to shut off auto rounding in Power BI. I'm querying data from SQL Server and the small values for example (.00058) does not even show a value in PowerBI but I know it's there when I export the data from SQL into a CSV
There is no automatic way but you can easily change it. Select your column (or measure) and on the ribbon, select column tools. Ensure decimal number is selected and change the number of decimal places visible.

I want to convert decimal digits to percentage in a column that has multiple data types

I want to convert decimal digits to percentage in a column that has multiple data types in Power BI.
How do I achieve this using query/measure in Power BI?
Input data: Data type of the column: Any
Expected output data
I have already tried using manually, but I need to know how to get the output dynamically using query/measure in power BI
Is this a measure, column or calculated column? if measure or calculated column you can do this in the "format" section in "column tools" section.
If it is a measure you will see it in the "measure tools" in the format section as well.
In both cases there should be a drop down menu that allows you to format the output.
You can use this convention to make the measure:
MeasureName:=IFERROR(sum(TableName[ColumnName]),blank())

Power BI - £ sign changes to # in text field

I'm creating some reports in Power BI. The data is stored on a SQL server and contains a Unit column with different units consisting of text and/or symbols. I have a problem with the £ sign, which is being converted by Power BI into a #.
How do I get Power BI to stop doing this? I can't see anything in the settings allowing me to change to UK English.
I'm getting around this by using Power Query to replace the # with a £. I could create a new column and use a substitute formula, but either solution isn't ideal in the long term, because 1/ the hashtag may be used for something else in the future and 2/ data comes from multiple sources and it will require additional work to ensure that the correct text is used in the report.
Go to data view in powerbi desktop.
Select the column you need to add currency. And from the above tabs click your currency.

How do I make Power bi show all data as is and not as error?

I have a set of data ~36 000 rows from which in one column there are numbers and numbers with text (100567563; WT1632366; 3275-2422 etc.) I need it to show the data as it is. It's not an error and I have tried changing what the data is (text numbers general in excel and in Power bi with no success. Any tips?
In power bi ensure that you have the datatype of that column as text, It works absolutely fine for me.
Power Query previews the dataset, and determines the datatype from the first 1000 rows. From your question I'm going to assume that the first lot of previewed rows are numerical.
You can order your Excel file to have the first rows as 'WT1632366' then when it loads the data it will convert it to the text/string type, and load the numerical columns as text.
If you look in the query editor, you will see a 'changed type', you can see the column name and the format. In the below image I have a column called 'Data' you can change it from:
"Data", Int64.Type
to
"Data", type text
And it should load.
Note: If you insert a step after it that does this, it may still not load and error
In the image, the first 1200 rows are the number 1, the 1201 row is the text 'ABC' this will fail on load unless you change formating to text. You can do this by clicking on the column and clicking on the '123' and change it from the selection to text. If it asked to replace current step use that option.
Once the datatypes are set it will not reavelate them on later loads, so you don't have to worry about data type changes

Is there a decimal number slicer in in PowerBI?

I'm showing a collection of points on a map in PowerBI and I would like to filter them to show, for example, only points contained between latitude x and y.
I can do that using the filter panel by setting rules on my latitude so it shows only points with latitude greater than x and less than y. However, I'd like to use a visual component to do that. The "Advanced Time Slicer" from the Visuals Gallery seems to do something really similar to what I'd like to achieve however it works with date/time values only.
I think what I would need is a simple and generic slicer that can select a range within a set of decimal values. Is there any component in PowerBI to achieve this ?
I would use the Filter pane. You could add your latitude field to the Visual Level Filters well (on the Visualizations pane, under Filters). Then a user viewing the report can open the Filters pane and specify a range of numeric values, e.g.
Show items when the value:
is greater than
10
and
is less than
30
This answer is for users who are still having this problem. This can be solved from the latest update of Power BI - Here is the corresponding Link.
Step 1. Duplicate the latitude and longitude column using query editor & give them the datatype of decimal number using query editor again.
Step 2. Put these decimal number latitude and longitudes columns that you just created inside the
numerical slicer. Link to the official document that talks about Numerical Slicer in PowerBI.
This would save us from creating measures to identify the between values of lat and long.