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.
Hello,
I'd like to build a dashboard in Power BI desktop using a dnynamic named range from Excel.
That's is, the name of the range is fixed but the range it refers to is managed in Excel VBA.
This doesn't seem to be working. When the data is refreshed in Excel, I click the refresh button in Power BI but nothing changes.
Can anyone help?
Thanks!
The way to go would be to replicate the dynamic logic in the query editor using M language.
So if you would provide descriptions/examples I could help you to set this up.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Thank you for your help.
Say, I have a named rage ('myRange') that refers to:
In Excel, this works fine. I'm using VBA to dynamically change the range reference. In Power BI, I import 'myRange' and it imports the data correclty.
The problem is that the data isn't refreshed accordingly when the user changes the range reference in Excel,
For example you could move the process of selecting an option from Excel to Power BI by using a parameter list there. Or is the selection of the dynamic range done by a different user?
Just create a table with the option names in one column and the ranges on the sheets in the second column. Then create a parameter which acts as a filter on the options-column of this table and use the returned value from the 2nd (ranges-) column as a parameter/variable for your import-query.
Hope this makes sense?
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hello,
Sorry for the late reply.
The user will select which area to use in Excel, it's not possible to shift that to Power BI.
Is there a way to update the range source in Power BI?
Thanks for your help.
Did you save the xls before trying to refresh from PBI?
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Yep!
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
No problem, thanks anyway!
Nice blog, by the way, I'm also researching on controlling/financial analysis with Power BI.
Thank you 🙂
I must admit that I find it hard to understand that the range you're successfully importing doesn't reflect the change.
I know cases where named ranges are not visible to the query editor/Power Query (Pivot ranges and cubefunctions sometimes). But once an object has been imported it should reflect the change. I'd probably send a frown then because that would count as a bug in my eyes.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
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 |
---|---|
105 | |
97 | |
80 | |
67 | |
62 |
User | Count |
---|---|
145 | |
111 | |
104 | |
84 | |
64 |