Forum Discussion
Assistance with Dynamic Parameters in Power Query
- Anonymous1 year ago
Hi,
Thanks for the solutions Omid_Motamedise , KNP and Vijay_A_Verma offered, and i want to offer some more information for user to refer to.
hello Pavan_123456789 , as the users mentined, if you use the paramater , you cannot input code in "Current value",you need to input the date.
If you want to use the code, you need to set the parameter in Advanche de Eddito separately and then reference it, you can refer to the code.
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwMtY31DdUitWBckz1TWAcEyDHDMEx1DdF4hjqGynFxgIA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Date = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}}), Rangestart=Date.From(Date.StartOfYear(DateTime.LocalNow())), Rangeend=Date.From(DateTime.LocalNow()), FilterRows=Table.SelectRows(#"Changed Type",each ([Date]>=Rangestart) and ([Date]<=Rangeend)) in FilterRowsBest Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Thanks for the solutions Omid_Motamedise , KNP and Vijay_A_Verma offered, and i want to offer some more information for user to refer to.
hello Pavan_123456789 , as the users mentined, if you use the paramater , you cannot input code in "Current value",you need to input the date.
If you want to use the code, you need to set the parameter in Advanche de Eddito separately and then reference it, you can refer to the code.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwMtY31DdUitWBckz1TWAcEyDHDMEx1DdF4hjqGynFxgIA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Date = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}}),
Rangestart=Date.From(Date.StartOfYear(DateTime.LocalNow())),
Rangeend=Date.From(DateTime.LocalNow()),
FilterRows=Table.SelectRows(#"Changed Type",each ([Date]>=Rangestart) and ([Date]<=Rangeend))
in
FilterRows
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.