Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

PBI - all data loaded are null

Hi

 

I have loaded data from folder consisting 4 excel files. The column titles are the same. After several changes, except for sample file, the others showed null when loading to PBI.

let
Source = Folder.Files("Shared folder\Data analysis\Speaker Data\Data to PBI"),
#"Filtered Hidden Files1" = Table.SelectRows(Source, each [Attributes]?[Hidden]? <> true),
#"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File", each #"Transform File"([Content])),
#"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {"Name", "Source.Name"}),
#"Removed Other Columns1" = Table.SelectColumns(#"Renamed Columns1", {"Source.Name", "Transform File"}),
#"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File", Table.ColumnNames(#"Transform File"(#"Sample File"))),
#"Promoted Headers" = Table.PromoteHeaders(#"Expanded Table Column1", [PromoteAllScalars=true]),
#"Renamed Columns" = Table.RenameColumns(#"Promoted Headers",{{"Speaker data 2021.xlsx", "Source.Name"}}),
#"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"Source.Name", type text}, {"No", Int64.Type}, {"Datekey", Int64.Type}...
in
#"Changed Type"

 

When I create a new PBI file from the same folder, evertything are good.

 

Anyone please can help? Thanks a lot.

  • Anonymous's avatar
    Anonymous
    3 years ago

    Thank Greg for very helpful. I tried, but still can not fix the issue. 

    I loaded the PBI from the begining and re-build the dashboard. All are good.

    Anyway, thanks for your help, as always.

10 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Anonymous Somebody else just recently had this issue, the problem turned out to be an extra space in one of their column headers. It's almost guaranteed that the file formats are different in some way. What happens if you use a different sample file? 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Greg_Deckler  Thanks Greg. I have copied the title column to other files to ensure they are the same.

      Also, I have tried to change sample file as your advice, the issue is the same - sample file is okay while others are null.

      • Greg_Deckler's avatar
        Greg_Deckler
        Community Champion

        Anonymous So do you really have this same column in every file?

        #"Renamed Columns" = Table.RenameColumns(#"Promoted Headers",{{"Speaker data 2021.xlsx", "Source.Name"}}),