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
NamishB
Post Prodigy
Post Prodigy

Folder as parameter

Hi,

 

I have a requirement where i want to read data from a folder location.

This folder has 10 excel files and i want to show these 10 as a filter parameter for a user to choose and my visuals should be filtered based on the data from that excel sheet.

I am able to pick up latest file by default (Keep Top rows 1) but is there a way to give user to filter which file they want to analyse from that folder.

FYI: all files are of same extension, just weekly some data is added/removed from the file.

 

Thanks in advance.

 

Namish

7 REPLIES 7
nsr299
Regular Visitor

Newbie here...

 

Is it possible to create a parameter that can swith between a folder and Sharepoint folder as a source?

 

Thanks!

Greg_Deckler
Super User
Super User

@NamishB - So, are you using a Folder query or are you grabbing them all individually? When you use a Folder query, there is a step where the name of the file is included. I think it gets selected out but you could modify the queries to keep it. Not sure if this is what you are going for or something else. It's not super clear.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Thanks @Greg_Deckler., sorry if i am not clear

I am trying to read data from a folder as Data source. Assume folder contains 10 files If i read the latest modified file (Top 1 row) this works perfect.

My question was if i need to show the user a list of file names in this folder (10 names), so they can choose which file they want to analyse?

NamishB_0-1599434298370.png

 

I hope this will be clear? Is there any clean way to do the user input on folder?

 

Cheers

@ImkeF @edhans , how do you preserve the Source.Name field in a Folder query so that it shows up as a column in the final table? Thanks.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@NamishB - to preserve any columns after you've done a combine operation, go back to the automatically generated Remove Other Columns1 step, hit the gear icon, and check what you want to keep. I think the August 2020 version of Power BI Desktop does this automatically for you (I just tested) but I know this has not always been the case, and it may depend on the types of files (text, Excel) and where you are combining from (OneDrive, local folder, SharePoint Library, DataLake, etc.)

 

You can see that Folder Path is  there for selection as well if you want it.

 

edhans_0-1599499811310.png

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

@edhans - Thanks, for some reason I could not track that down!! @NamishB does this get you where you need to be?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.