简体   繁体   English

如何让 Power bi 按原样显示所有数据而不是错误?

[英]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.我有一组数据 ~36 000 行,其中一列中有数字和带有文本的数字(100567563;WT1632366;3275-2422 等)我需要它来显示数据。 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?这不是错误,我已经尝试更改数据是什么(excel 和 Power bi 中的通用文本编号,但没有成功。有什么提示吗?

In power bi ensure that you have the datatype of that column as text, It works absolutely fine for me.在 power bi 中确保您将该列的数据类型作为文本,它对我来说绝对没问题。

在此处输入图像描述

Power Query previews the dataset, and determines the datatype from the first 1000 rows. Power Query 预览数据集,并根据前 1000 行确定数据类型。 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.您可以订购 Excel 文件以将第一行作为“WT1632366”,然后在加载数据时将其转换为文本/字符串类型,并将数字列作为文本加载。

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.在图像中,前 1200 行是数字 1,第 1201 行是文本“ABC”,除非您将格式更改为文本,否则加载将失败。 You can do this by clicking on the column and clicking on the '123' and change it from the selection to text.您可以通过单击列并单击“123”并将其从选择更改为文本来执行此操作。 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一旦设置了数据类型,它将不会在以后的加载中重新显示它们,因此您不必担心数据类型的更改

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM