Forum Discussion
michellepace
6 years agoResolver III
Use parameter (defined in power query) in calculated dax column?
Hello there. I have defined a parameter FinancialYear_Start_Period in power query editor. I would like to use this parameter in a calcuated dax column. Is it possible? Thank you, Michelle
- 6 years ago
You could load that parameter into a table, that way you will able to refer to that:
// Parameter1 10 meta [IsParameterQuery=true, Type="Number", IsParameterQueryRequired=true] // ParamTable let Source = Parameter1, #"Converted to Table" = #table(1, {{Source}}), #"Changed Type" = Table.TransformColumnTypes(#"Converted to Table",{{"Column1", Int64.Type}}), #"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"Column1", "Parameter"}}) in #"Renamed Columns"
v-lionel-msft
6 years agoCommunity Support
Hi michellepace ,
Unless you load the parameters into the data model.
Right click the parameter in 'Edit Query' -> Check the ‘Enable load’ option.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.