Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Saide
Frequent Visitor

PowerBI refresh from Excel data source crashes on the only column that has a formula

Good morning All,

 

I have a PowerBI project with data from an Excel stored on SharePoint. Here and then it happens that no data is loaded after refresh into PowerBI. It is after someone has updated values in the file . It seems to be caused by the only column that has a formula (=HLOOKUP($A$1;KPI_ACTIVE_COU;ROW()-1;FALSE). I get Error in the query: DataFormat.Error: Invalid cell value 'VALUE!'

 

The only working fix I found so far was to unhide all the columns. I use the following macro for that:

 

The only solution I found so far that works each time I don't get the data is to go to the source file and unhide all columns using VBA macro that was there in the file:

 

Sub Unhide_All()
'
' Unhide all cells and columns
Dim PageName As Variant
Dim index As Integer
i = 2
Do While i < 20
PageName = Sheets("Column").Range("A" & i).Value
Sheets(PageName).Select
Range("A1").Select
ActiveWindow.FreezePanes = False
Columns("A:N").Select
Selection.EntireColumn.Hidden = False
Columns("A:N").EntireColumn.AutoFit

i = i + 1
Loop
End Sub

 

I do not know why it works but it works. I tried to replicate the issue by hiding/grouping/freezing some columns as I saw that when it was not working some columns/rows were grouped, hidden or frozen etc. and since there is unpivot step in the query that was my suspect no. 1 but the load was always working. Nevertheless if it does not work the above macro to unhide all solves it 🤔

 

In other words how to find the source of this DataFormat.Error: Invalid cell value 'VALUE!' error and how to fix it?

 

Anyone had similar problem maybe? I would appriciate any help. 

Thank you!

2 REPLIES 2
v-eqin-msft
Community Support
Community Support

Hi @Saide ,

 

According to the official documentWhen you import an Excel workbook from your personal OneDrive, any data in the workbook, like tables in worksheets and/or data that are loaded into the Excel data model and the structure of the data model, are imported into a new dataset in Power BI. Power BI automatically connects to the workbook on OneDrive, or SharePoint Online, about every hour to check for updates. If the workbook has changed, Power BI will refresh the dataset and reports in the Power BI service.

 

In addition, you could configure Scheduled refresh

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Eyelyn 🙂

Thanks for the tip. Unfortunately it is not what I meant. I refresh my data manually. Normally it works even if changes were made to the source file in Excel on SharePoint. From time to time it happens that the refresh crashes, no data is uploaded, previous data disappears. I do not know what changes made by users are causing it. I only know that to solve it I need to run a macro that inhide/unfreeze all the columns and rows. What I need it either to fine the cause or a solution that does not require me to go to the source file and run a macro. 

Than you anyway,

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors