Forum Discussion

Let-Me-Know's avatar
Let-Me-Know
Frequent Visitor
3 years ago
Solved

Formatting Column with data of various types to be countable in visualizations

Hi everyone, I am quite new to Power BI and would appreciate your help!   I have problem with transforming data type in specific column in Power Query Editor. Source for the data is Excel table and...
  • v-jingzhang's avatar
    3 years ago

    Hi Let-Me-Know 

     

    Once you connect to an Excel file, there is usually a "Changed Type" step which is generated automatically. In this step your [Transaction ID] column is changed into Number type. Please remove this step by clicking the "×" next to it and change this column to Text type manually from Transform > Data Type. Change the data type of other columns manually too. 

     

    Text data type will not affect the result of COUNT aggregation. When you want to do a sum up, it should be on another number type column in the table right? It's meaningless to sum up the [Transaction ID] column. Please check whether the column to be summed up has been changed to number type in advance. 

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.

  • ronrsnfld's avatar
    3 years ago

    In the Power Query editor there will be a step titled #"Changed Type"

     

    If you open the Advanced Editor, you will see a line looking something like:

     

    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Transaction ID", type number},{"Other column Names", type...}}),

     

    Merely change type number to type text