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.
Hi community!
I have a report that I need to update several times with different cases or sensitivities, all coming from an Excel file with the same structure (same spreadsheets, same tables, same columns, etc).
My Excel source files are stored in SharePoint. After long digging in the web, I found out that in order to do so, I need to go to each of my queries, under 'Applied Steps', and change the M code in the Advanced editor with the new source info. That works fine, but is a bit cumbersome.
After talking with a colleague of mine, he told me he's using some sort of workaround with custom columns in the import, manipulating file info, so that he has a visualization where he selects what he wants to see. However he's using OneDrive, which changes everything. Does anyone know how to to so? Help would be much appreciated.
Thanks and regards
Nelson
Solved! Go to Solution.
I'm not sure if this is what you mean, but something like I've done in this post:
Use parameters to combine data
Stage A: Because the data comes from the SharePoint folder, you must already have the Parameter table, so when you type the SharePoint site name, filter the path of the folder you want, but leave all Excel files there. If you don't already have a column with the file path, you may need to perform a merge or something similar: I can't remember exactly what SharePoint data looks like, so you may need to share a screenshot of your Power Query if you need help at this stage.
Stage B - I think you've already done most of stage B - you've created your sample files, now you just need to create the parameter.
Stage C: Convert existing queries to functions and reference the file path as a parameter.
Stages D and E should make more sense if you've come this far.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
The situation is the following:
1) There is a single Excel file, with multiple spreadsheets that feed my PowerBI report;
2) The source Excel file is stored in a SharePoint folder
3) In my PowerBI report I have multiple queries (Sorry, you'll see next a Portuguese screenshot, but I guess it's enough to have the big picture)
4) Whenever I want to change the source data file I need to go to each one of my queries and change the M code in the Advanced editor;
5) I'm quite new with DAX and M code, but I've been wondering whether it's possible to create kind of a variable where I somehow save the file name and use it embedded into the source M code to call the file I want at a selection of a given option in a filter in visualization.
What I believe a colleague of mine told me is that he kind of added some custom column at the import stage in order to combine the files with their respective name, calling that same name, hence being able to see the data he selects.
I'm not sure if this is what you mean, but something like I've done in this post:
Use parameters to combine data
Stage A: Because the data comes from the SharePoint folder, you must already have the Parameter table, so when you type the SharePoint site name, filter the path of the folder you want, but leave all Excel files there. If you don't already have a column with the file path, you may need to perform a merge or something similar: I can't remember exactly what SharePoint data looks like, so you may need to share a screenshot of your Power Query if you need help at this stage.
Stage B - I think you've already done most of stage B - you've created your sample files, now you just need to create the parameter.
Stage C: Convert existing queries to functions and reference the file path as a parameter.
Stages D and E should make more sense if you've come this far.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
98 | |
78 | |
65 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |