简体   繁体   English

Power BI 数据类型

[英]Power BI Data Types

I have loaded an xlsx file into power BI.我已将一个 xlsx 文件加载到 Power BI 中。 In my data set there are columns that have numbers and text.在我的数据集中有包含数字和文本的列。 I don't know how to get power bi to recognize the column a whole numbers.我不知道如何让 power bi 识别整数列。 I need this to happen because right now when I sort from highest to lowest it will go like this 1, 11, 2, 29, 4. It only sorts by the first digit and not the whole number.我需要这样做,因为现在当我从最高到最低排序时,它会像这样 1、11、2、29、4。它只按第一位而不是整数排序。

In order to change data types of any column, please click Edit Queries option under the Home tab .要更改任何列的数据类型,请单击主页选项卡下的编辑查询选项。

在此处输入图片说明

Clicking Edit Queries option will open a new window called Power Query Editor .单击“编辑查询”选项将打开一个名为Power Query Editor的新窗口。

Please select the Column for which you want to change the data type.请选择要更改数据类型的列。 Next, click on the left corner of the column header (currently it represent ABC text)接下来,单击列标题的左上角(目前它代表ABC文本)

https://www.tutorialgateway.org/wp-content/uploads/Change-Data-Types-of-a-Column-in-Power-BI-3.png

Clicking in that position will open a drop-down list of supported data types.单击该位置将打开支持数据类型的下拉列表。 Please select the data type that suits your data.请选择适合您数据的数据类型。 Here, we are selecting the Whole number.在这里,我们选择整数。

在此处输入图片说明

Changing data type of a column will open the following pop up window.更改列的数据类型将打开以下弹出窗口。 Click on the Replace Current button.单击替换当前按钮。

在此处输入图片说明

Now you can see the Yearly Income header is displaying 123 (whole number) not ABC (text).现在您可以看到 Yearly Income 标题显示的是 123(整数)而不是 ABC(文本)。

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

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