The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
We have a SharePoint site that stores time keeping reports. At the end of the month, I have configured a flow to move the current report to an archive folder for the month. 'January', 'Febuary', 'March', etc... are the folder names. I am wondering if it is possible to create a slicer in Power BI to allow a user to select what folder they want to view containing that months report. The visualiations would then all update accordingly. I was thinking it could be possible by writing some Python to pull the date that is located on the report, then adding a column full of this data. Then I could combine all reports and slice based off of that.
Wondering if anyone else had any better ideas.
Thanks,
Brad
Solved! Go to Solution.
@Anonymous the technique should be load all the reports and tag each report with a respective period which will be then used to slicer the data. There are many topics on how to load data from share point folders and append together.
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi @Anonymous ,
If you want to use slicer to achieve this goal, you need to make sure all columns in each month folder have same name and type. Then you could try to below code to achieve this goal
let
Source = SharePoint.Files("https://<company>.sharepoint.com/teams/fortest2", [ApiVersion = 15]),
#"Inserted Text Between Delimiters" = Table.AddColumn(Source, "Text Between Delimiters", each Text.BetweenDelimiters([Folder Path], "/", "/", {1, RelativePosition.FromEnd}, 0), type text),
#"Filtered Rows" = Table.SelectRows(#"Inserted Text Between Delimiters", each ([Extension] = ".xlsx") and ([Text Between Delimiters] = "Feb" or [Text Between Delimiters] = "Jan")),
#"Filtered Hidden Files1" = Table.SelectRows(#"Filtered Rows", each [Attributes]?[Hidden]? <> true),
#"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File (2)", each #"Transform File (2)"([Content])),
#"Removed Other Columns1" = Table.SelectColumns(#"Invoke Custom Function1",{"Text Between Delimiters", "Transform File (2)"}),
#"Expanded Transform File (2)" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File (2)", {"year", "max", "date"}, {"year", "max", "date"})
in
#"Expanded Transform File (2)"
when you click expand [content], it will automatically generate #Invoke Custom Function1 step, then you could choose [Transform File] and month column to expand, and use this month column in slicer, then you will achieve your goal.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , I doubt you can change the connection setting at run time. But check if this can help
https://community.powerbi.com/t5/Power-Query/Connecting-to-Sharepoint-Specific-Folder/m-p/876092
@Anonymous the technique should be load all the reports and tag each report with a respective period which will be then used to slicer the data. There are many topics on how to load data from share point folders and append together.
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.