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
njrandell
Helper I
Helper I

How can I query a csv file locally and azure blob when published?

I'm currently building a set of reports that are published online. In order to make it easy to develop, I use local csv files using PowerBI desktop before using multiple azure blobs when deployed as a Power BI App.

 

At the moment I have the following in my data sources, all stored in a simple 'LoadData' function that is called for all my data sources.

 

Source = Table.RenameColumns(Folder.Contents(#"Source Folder", {"Content", "Data"}),
//    Source = AzureStorage.Blobs(#"Source Blob"),
Data = Source{[Name=#"DataType" & "-" & #"FolderName"]}[Data],

When running locally, I have the file one uncommeted as above, and just before publishing, I uncomment the azure storage line.

 

However I would rather control this using a parameter or some other mechanism, but they all fail with Data source error{FieldValue}, even when I put it in a 'try ... otherwise ...' block

 

Source = try Table.RenameColumns(Folder.Contents(#"Source Folder"), {"Content", "Data"}) otherwise AzureStorage.Blobs(#"Source Blob"),

    

Is what I'm doing possible, or do I have to keep modifying the function before publishing?

 

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@njrandell,

 

As far as I know, the data source would not change.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I'm don't understand what you are saying?

 

When I publish the report the fact that there is a local file based source seems to prevent the dataset being refreshed, even though a parameter bypasses the local source.

 

I'm not changing the source, just updating a parameter to use blob storage rather than folder storage

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.