Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hi,
I have a simple function that evaluates an Excel's Named Range to get its value like this:
(RangeValue as text) =>
let
RangeValue = Excel.CurrentWorkbook(){[Name=RangeName]}[Content]{0}[Column1]
in
RangeValueTo call this I simply do
RangeValue("SomeExcelNamedRange")However, this will evaluate only individual named ranges at a time. What if I want to evaluate 3, 4, or any other number named ranges from Excel? I would call the new function like this:
RangeValues({"Name1", "Name2", ... "NameN"})
Could you help me write this new function?
Thanks
Solved! Go to Solution.
Here is an example
https://www.dropbox.com/s/r2ha4qe9513ft08/functions.xlsx?dl=1
What you have written as the pseudo code is one function with 3 parameters. You could execute the same function that takes 1 parameter 3 times instead. In power query, create. List of ranges. {“rg1”,”rg2”} etc. Convert to a table, Then insert column, invoke custom function and pass the column values to the function. Then combine
Sorry could you show me the code to do that?
I am not sure what your method does, but how would I invoke this new function?
The simplicity that I seek is that I can easily type in one line the items in my list and the desired macro would execute them, without having to create new queries or tables.
Hi @freelensia ,
Have you solved your problem?
If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you still need help, please feel free to ask.
Best Regards,
Cherry
Here is an example
https://www.dropbox.com/s/r2ha4qe9513ft08/functions.xlsx?dl=1
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 29 | |
| 23 | |
| 18 | |
| 18 | |
| 15 |
| User | Count |
|---|---|
| 51 | |
| 44 | |
| 43 | |
| 39 | |
| 32 |