Power Query error : Unable to load data from data model

Alvin187

New Member
Joined
Jul 8, 2021
Messages
7
Office Version
  1. 2016
Platform
  1. Windows
Hi all,
I just started learning Power Query,
I have imported data from my table and when I am trying to close and load the query I run into the following error

We couldn't get data from data model, here's the error message we got.
no error message available, result code: -2146233052(0x80131524)

I have done the following
1) Repaired MS office
2) Reinstalled MS office
3) Checked all column names to ensure that there are no spaces / Replaced all spaces with underscore

There is no syntax error in my code but am posting it here, do have a look.
Please help in resolving this.

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Bag No", type text}, {"2nd July", type text}, {"3nd July", type text}, {"5th July", type text}, {"6th July", type text}, {"7th July", type text}, {"8th July", type text}, {"9th July", type text}, {"10th July", type text}}),
    #"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([Dispatched Date] = null)),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Filtered Rows", {"Bag No", "Attribute", "Value"),
    #"Removed Columns" = Table.RemoveColumns(#"Unpivoted Columns",{"Attribute"}),
    #"Grouped Rows" = Table.Group(#"Removed Columns", {"Bag No"}, {     
 
     {"Batch Making", (t)=> Text.From(List.Count(List.Select(t[Value],each _ = "Batch Making"))) & " days"},
     {"Waxing", (t)=> Text.From(List.Count(List.Select(t[Value],each _ = "Waxing"))) & " days"}
        })
in
    #"Grouped Rows"
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Open the query in PowerQuery. It should tell you more.
The Advanced Editor says you have a syntax error ono row 5:
Power Query:
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Filtered Rows", {"Bag No", "Attribute", "Value"}),
 
Upvote 0
HI All,
I solved the issue,
I had not updated my windows as well as my excel for quite some time...
once all the updates were finished power query started working .

try this first before u go for reinstalling office.. ??
 
Upvote 0
Solution

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top