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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

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

@Anonymous - 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.



Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

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.



Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

@Anonymous - 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!! @Anonymous does this get you where you need to be?



Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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