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 nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
Hi folks ,
I need your help.
I have code which was written in DAX (PowerBI Desktop), but I need to convert it in Power Query in PowerBi Services to be used on a datamart. Below is the code :
Parameter1 = GENERATESERIES(0, [Current Period], 1) on the Parameter table
Measure1 = SELECTEDVALUE('Parameter'[Parameter1]) on the Parameter table
The problem I have is that , [Current Period] is a measure created in datamart using another table, it is not available in Parameter table . It is not available in Transformation View. This means that I cannot use it to create a calculated field/colums "Parameter1" in the Transformation View.
I managed to create Parameter1 = GENERATESERIES(0, [Current Period], 1) as measure in the datamart , but I get an error when I try to reuse it while I am creating the Measure1 = SELECTEDVALUE('Parameter'[Parameter1]).
I get the following error :
Column 'Parameter1' in table 'Parameter' cannot be found or may not be used in this expression. Alhtought I have created it as a measure.
I tried to use the following approach and i am getting pretty much the same error :
Measure1 = SELECTEDVALUE(GENERATESERIES(0, [Current Period], 1)).
Question : does anyone knows how I can achieve this what was wording in DAX in destop and do it in DAX and PowerQuery in PowerBi Services?
Thanks for your help.
@Anonymous , You use List.Numbers to generate series of numbers
Power Query- List.Numbers: https://youtu.be/7_4V_Om-FEk
Selectedvalues only work in a measure, so you have to create a measure
Measure1 = SELECTEDVALUE('Parameter'[Parameter1])
Thanks for replying . I know that because I have used it for another parameter. The issue with this one is that , I cannot create it in powerQuery because it uses "[Current Period]" as a max but [Current Period] is a measure which is not available in PowerQuery. Is there anyways I reuse a measure in powerQuery? That's the issue I am trying to solve.
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 21 | |
| 20 | |
| 19 | |
| 13 |
| User | Count |
|---|---|
| 58 | |
| 52 | |
| 37 | |
| 31 | |
| 27 |