Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I am getting data from an API request which requires me to include a number of parameters that are dynamic. The first one is the ID of the circuit I wish enquire on. I have set this up to allow the user to select the relevant ID so that the GET statement is updated accordingly (fldPhase2ID)
The API request changes as expected and returns the required data. I am not sure the correct terminology in terms of how the data is returned but see below
The 23860 is the ID as selected by the user, so can obviously change so I am trying to make
#"Phase to find" = Source[23860]
dynamic. I have tried the following with no luck - error message "Invalid Identifier"
#"Phase to find" = Source[Text.From(fldPhase2ID)]
I have also tried withoug the Text.From function and get the following error
BI is not my strength, so I am sure what I am trying to do is simple, but I'm certainly out of my depth. Any help appreciated
Solved! Go to Solution.
Hi @cameroon
In this case, the Source step is returning a record with a single field whose name corresponds to fldPhase2ID.
Either of these should work for the Phase to find step:
1. Return the value of the field whose name corresponds to the value of fldPhase2ID:
#"Phase to find" = Record.Field( Source, Text.From( fldPhase2ID ) )
or
2. Return the value of the first field of the record:
#"Phase to find" = Record.FieldValues( Source ){0}
I would probably recommend method 1.
Does this work for you?
Regards
Hi @cameroon
In this case, the Source step is returning a record with a single field whose name corresponds to fldPhase2ID.
Either of these should work for the Phase to find step:
1. Return the value of the field whose name corresponds to the value of fldPhase2ID:
#"Phase to find" = Record.Field( Source, Text.From( fldPhase2ID ) )
or
2. Return the value of the first field of the record:
#"Phase to find" = Record.FieldValues( Source ){0}
I would probably recommend method 1.
Does this work for you?
Regards
Hi @OwenAuger
Never tried option 2 as option 1 worked perfectly. I understand the logic of it, but know there was no way I was getting there on my own. Thanks for the help
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
8 | |
6 | |
6 | |
5 | |
5 |
User | Count |
---|---|
10 | |
8 | |
6 | |
6 | |
6 |