Forum Discussion

MylèneB's avatar
MylèneB
Icon for Helper II rankHelper II
5 years ago

Detect data type on all columns in a template

Hi!

I'm trying to create a template for a report and the final step in my query are 'Detect data type' on all my columns.

 

Unfortunately our data won't always have the same column names, so when we upload it in the template, we need to manually redo the step of detect data because it doesn't recognize the column names. Is it possible to create a step where it is 'Detect data type on all data whatever columns names'?

 

Thanks a lot!

5 Replies

    • MylèneB's avatar
      MylèneB
      Icon for Helper II rankHelper II

      Hi Chris! Thank you!

      In this way, do I have to know which column will be which type? Because I don't know always know, some of the columns aren't in the same order.

      • ChrisMendoza's avatar
        ChrisMendoza
        Icon for Resident Rockstar rankResident Rockstar

        MylèneB - In the example I suggest, yes, you would need to know the column types. I seem to only be addressing your Column Headings issue and I do not know how to address your issue of different Column order's.

  • Anonymous's avatar
    Anonymous
    Not applicable

    MylèneB 

     

    Power Query should automatically detects data, and change data types based on the imported table, you should able to see the signs in front of the column names. 

     

     

    Paul Zheng _ Community Support Team

    • MylèneB's avatar
      MylèneB
      Icon for Helper II rankHelper II

      Hi,

      Maybe because I did other steps prior, but it doesn't detect the data type and if I go back to the report, all the visuals are 'broken' because they didn't detect that it was a number for example.

      Maybe, there is no workaround and just need to redo the step when creating a new report from my template.