Forum Discussion
query to parameter
- 5 years ago
Hi robon ,
Have you refreshed data or applied changes?
As tested here,it works fine:
For "parameter",modify it as below:
let Source = ()=> let #"New ID"=Table.FromRecords({Table.SelectColumns(#"Table","Table.SessionID "){0}}) in #"New ID" in SourceAnd you will see:
For the updated .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
If got a query that give back the sessionID and other info. I want to use the sessionID in another query. This is the table from the first query that shows the session ID query. The "Table.Table.Table.SessionID" and then the first value i want as parameter (or something else i can use in other query's.
Thanx again,
Rob
Hi robon ,
Create a function as below:
let
Source = () => let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtQz0jNW0lHySE1MSS1SitWJVsorzckBijjlp1QqxcYCAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Table.SessionID " = _t, Name = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Table.SessionID ", type text}, {"Name", type text}}),
#"New ID"=Table.FromRecords({Table.SelectColumns(Source,"Table.SessionID "){0}})
in
#"New ID"
in
Source
And you will see:
The parameter gets the first value of column "Table.SessionID" and can be used in another query.
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
- robon5 years agoFrequent Visitor
Sorry for my late responce. thanks i gonna try this today i keep you updated thanks again!
- robon5 years agoFrequent Visitor
Hi Kelly,
when the session id is changed the other doesn't change. I'am new to this so i probably do something wrong:(
thanks
Rob
- v-kelly-msft5 years agoCommunity Support
Hi robon ,
Have you refreshed data or applied changes?
As tested here,it works fine:
For "parameter",modify it as below:
let Source = ()=> let #"New ID"=Table.FromRecords({Table.SelectColumns(#"Table","Table.SessionID "){0}}) in #"New ID" in SourceAnd you will see:
For the updated .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
- robon5 years agoFrequent Visitor
Thanks Kelly,
I replaced the parameter and now it is working great.
I'am really happy with this Thanks again
Rob