Forum Discussion
Using FRED Data
- 7 years ago
API can be tough. Basically, it's like getting from a web source. Check out these instructions: https://blogs.msdn.microsoft.com/charles_sterling/2016/05/25/how-to-call-rest-apis-and-parse-json-with-power-bi/
powerbime, your api request looks good. This is what I get when I use it. The tan word Table is a signal that you have some data to expand. Click the double expansion arrows in the green square to see what's available.
You can choose some or all.
Chances are good you only want date and value, and you probably don't want to keep the original column name as prefix (you can uncheck what you don't want in the prior step), but here's everything in this data set.
Thanks,
I see the expansion arrows and when i choose I get the menu like in your picture but no "Value". See the snips below. I am using the GNPCA indicator but I do not get the same data as in your example. It's like if it is only giving me the indicators description but no values or historical dates.
What I get is this
- Anonymous5 years agoNot applicable
The instructions I gave to powerbime above will give multiple observations in the same table. Do you mean observations from multiple series? You can add a dates table to your BI and merge on dates to get multiple data series in the same BI table.
- Anonymous5 years agoNot applicable
You can definitely pull them in separately whether with Python or the web connector and use PowerBI to combine if that's necessary. I tend to keep them in their own tables and combine in visuals.
- Anonymous6 years agoNot applicable
In the transform data area, there is be a ribbon option that's labeled something like advanced editor. Can you please open that and take a screenshot of the window to post here to help with further troubleshooting? Of course it's fine to obscure your API key.
- powerbime6 years agoFrequent Visitor
Here it is and thanks again. I don't know why I am having so much trouble.
- powerbime6 years agoFrequent Visitor
And with the expansion as well
- Anonymous6 years agoNot applicable
Try this, powerbime . You can skip the change type step, which I'm guessing was automatic. The removed other columns step gets this down to just the date and the observation. If you want the other columns, delete this step.
let Source = Xml.Tables(Web.Contents("https://api.stlouisfed.org/fred/series/observations?series_id=GNPCA&api_key=YOURKEYHERE")), #"Expanded observation" = Table.ExpandTableColumn(Source, "observation", {"Attribute:date", "Attribute:value"}, {"Attribute:date", "Attribute:value"}), #"Removed Other Columns" = Table.SelectColumns(#"Expanded observation",{"Attribute:date", "Attribute:value"}) in #"Removed Other Columns" - powerbime6 years agoFrequent Visitor
No luck
Maybe I am getting different data.
the Series you posted does not have the same columns I get. For one I do not get attribute:value, which is why i imagine I so not see the data.
- Anonymous6 years agoNot applicable
Hi, powerbime I can see attribute:value in the list in your screen shot. Do you need to scroll to the right to see the column? I recommend unchecking all but the value and date.
- powerbime6 years agoFrequent Visitor
Sorry for the misunderstanding I sent you the screen that you had in your reply when I sent this screen which is mine you will see not the same fields you have.
- Anonymous6 years agoNot applicable
Hi, powerbime. I realized that when I checked your screenshot to confirm your code, you were actually showing my screenshot with my code. Two of your screen shots do show an error in your code:
https://api.stlouisfed.org/fred/series/observations?series_id=GNPCA&api_key=YOURAPIHERE
You need to add /observations where the red caret and text indicates, between the first word series and the question mark.
I hope you enjoy many happy uses of the FRED data. 😃
- powerbime6 years agoFrequent Visitor
Thats it!!!!
Thank You so much for your help and patience
- Anonymous6 years agoNot applicable
You're very welcome powerbime . Glad to pass along some of what I've learned.
- Anonymous5 years agoNot applicable
Do you guys know how to get multiple observations in the same table?
- Anonymous5 years agoNot applicable
I will try that, I was trying to get multiple observations from different series without having to write a python script for it but I will try merging the different data. Thanks!