cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
krixtsup3r
Helper IV
Helper IV

Index Error

Hi Guys,

 

I'm getting this error (image below) when I try to refresh it in the web, but if I check it on Desktop then refresh it, it doesn't give me any error. Any reason why is that?

 

index_error.PNG

 

Thank you!

1 ACCEPTED SOLUTION

@krixtsup3r - OK, this seems to be the same problem as here:

https://community.powerbi.com/t5/Service/Refresh-Error-in-PowerBI-Service-No-issue-refreshing-in-Des...

Change this:

 

= Table.AddIndexColumn(#"Added Index", "Index.1", 0, 1, Int64.Type)

 

to this:

= Table.AddIndexColumn(#"Changed Type", "Index", 0, 1)

Maybe get rid of the Int64.Type? Wait, maybe it doesn't like that you sorted the rows and didn't do a Table.Buffer? @v-deddai1-msft 


@ me in replies or I'll lose your thread!!!
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Learn Power BI 2nd Edition

View solution in original post

8 REPLIES 8
Greg_Deckler
Super User
Super User

@krixtsup3r Are you able to paste your Advanced Editor code? The error says you passed too many arguments but what it calls out I only see 4 arguments and it says there were 5 passed in so maybe need to see surrounding code to understand what is going on.

 

 


@ me in replies or I'll lose your thread!!!
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Learn Power BI 2nd Edition
amitchandak
Super User
Super User

@krixtsup3r ,  have configured any scheduler for it? if so, please check any error there.

 

Also, what kind of connection it is. Does it require Gateway or details that can be given at power BI service? Make sure either Gateway is the place or credentials have been given at the service level. (Because I can see connection error)

 

If everything is set and you still have an error

You can check and log an issue at -https://community.powerbi.com/t5/Issues/idb-p/Issues



Power BI Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau User !!

Hi Guys,

 

Thank you for the response:

 

@amitchandak , I actually havent set any schedules yet. I just tried to refresh it On Demand and I get that error.

@Greg_Deckler, here's my code (see below), I am not really sure what's happening. In the Desktop it refreshes fine but when I refresh it on Service I get the error.

 

let
    Source = Folder.Files("C:\Users\\Productivity Raw"),
    #"Removed Other Columns" = Table.SelectColumns(Source,{"Content"}),
    #"Filtered Hidden Files1" = Table.SelectRows(#"Removed Other Columns", each [Attributes]?[Hidden]? <> true),
    #"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File", each #"Transform File"([Content])),
    #"Removed Other Columns1" = Table.SelectColumns(#"Invoke Custom Function1", {"Transform File"}),
    #"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File", Table.ColumnNames(#"Transform File"(#"Sample File"))),
    #"Changed Type" = Table.TransformColumnTypes(#"Expanded Table Column1",{{"name", type any}, {"productivity", type any}, {"job_count", type any}, {"total_review_time", type any}, {"total_research_time", type any}, {"total_inactive_time", type any}, {"queue", type any}, {"day", type any}, {"user_id", type any}}),
    #"Extracted Date" = Table.TransformColumns(#"Changed Type",{{"day", DateTime.Date, type date}}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Extracted Date",{{"total_inactive_time", type number}, {"total_research_time", type number}, {"total_review_time", type number}, {"job_count", type number}, {"productivity", type number}}),
    #"Inserted End of Week" = Table.AddColumn(#"Changed Type1", "End of Week", each Date.EndOfWeek([day],1), type date),
    #"Inserted Start of Month" = Table.AddColumn(#"Inserted End of Week", "Start of Month", each Date.StartOfMonth([day]), type date),
    #"Removed Other Columns2" = Table.SelectColumns(#"Inserted Start of Month",{"day"}),
    #"Removed Duplicates" = Table.Distinct(#"Removed Other Columns2"),
    #"Sorted Rows" = Table.Sort(#"Removed Duplicates",{{"day", Order.Descending}}),
    #"Added Index" = Table.AddIndexColumn(#"Sorted Rows", "Index", 1, 1, Int64.Type),
    #"Renamed Columns" = Table.RenameColumns(#"Added Index",{{"Index", "IndexDaily"}}),
    #"Filtered Rows" = Table.SelectRows(#"Renamed Columns", each [day] <> null and [day] <> ""),
    #"Changed Type2" = Table.TransformColumnTypes(#"Filtered Rows",{{"IndexDaily", type number}})
in
    #"Changed Type2"

 

@krixtsup3r - OK, this seems to be the same problem as here:

https://community.powerbi.com/t5/Service/Refresh-Error-in-PowerBI-Service-No-issue-refreshing-in-Des...

Change this:

 

= Table.AddIndexColumn(#"Added Index", "Index.1", 0, 1, Int64.Type)

 

to this:

= Table.AddIndexColumn(#"Changed Type", "Index", 0, 1)

Maybe get rid of the Int64.Type? Wait, maybe it doesn't like that you sorted the rows and didn't do a Table.Buffer? @v-deddai1-msft 


@ me in replies or I'll lose your thread!!!
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Learn Power BI 2nd Edition

It worked! Thank you so much.

@krixtsup3r Must be some kind of bug going on in the Service or something, that issue seems to be very recent. I think they added the ability to specify the type on the Index but apparently the Service missed that memo. Did you read the memo?

[video]


@ me in replies or I'll lose your thread!!!
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Learn Power BI 2nd Edition

That's why it happened to 4 of my PBI projects.

I honestly haven't read the memo, I just usually scan through the new updates on each month. Thank you so much for your help, man! 

@krixtsup3r No problem, I was joking about the memo!! The Service needs to read the memo!!


@ me in replies or I'll lose your thread!!!
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Learn Power BI 2nd Edition

Helpful resources

Announcements
August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 24 without aka link and time 768x460.jpg

Ted's Dev Camp - July 28, 2022

Watch Session 24 of Ted's Dev Camp along with past sessions!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors