Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Working with the MailChimp API and a field called "list_stats" didn't come through on a few records from the Campaign Summary. Unfortunatly I can't figure out how to transform the table prior to expanding.
I've tried
Table.ExpandColumns() without listing 'list_stats' in the function arguements but it still gave errors.
I tried to combine some learnings from this blog post and another from this post. But this codes doesn't work because I'm not trying to transform a List but a Table
Table.TransformColumns(#"Filtered Rows",{{"Data", each List.Transform(_, each Record.SelectFields(_,{"list_stats"},MissingField.UseNull))}})
So far I have the basic stuff
let
Source = MailChimp.TablesV2(),
campaigns = Source{[Key="campaigns"]}[Data],
#"Filtered Rows" = Table.SelectRows(campaigns, each ([Name] = "Campaign Summary")),
#"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows",{"Data"}),
Data = #"Removed Other Columns"{0}[Data],
I know that @MarcelBeu could answer this but I may have used up my help requests for the week.
Solved! Go to Solution.
For now, I modified the query...instead of pulling the Campaign Summary UI endpoint I leveraged the Instance function
= #"MailChimp Instance"("/reports?since_send_time=2014-01-01&count=500")
It gives me the same number of results after I remove the error rows and the rows with "sent_time" = blank
Hi @Anonymous,
Can you share the results of the step "#"Removed Other Columns""? It seems the issue is the value can't be changed to record type.
You can use below Query to check 14th row, if any column values different from others.
let
Source = MailChimp.TablesV2(),
#"Filtered Rows" = Table.SelectRows(Source, each ([Name] = "Campaigns"))[Data]{0}
in
#"Filtered Rows"
Maybe @ImkeF @MarcelBeug have another good suggestions.
Best Regards,
Qiuyun Yu
Hey @v-qiuyu-msft
I modified the code slightly to pull just the campaign summary: = Table.SelectRows(Source, each ([Name] = "Campaign Summary"))[Data]{0}
but receive the error message "Expression Error: There weren't enough elements in the enumeration to complete the operation. Details: List"
The result of the Removed Other Columns is just a sigle table with The Data field and one value as Table, then if you try to expand the table you get the second screen shot with row 14 showing error.
Some how it needs to modify all records in the table to include the "list_stats" if it doesn't already have it
For now, I modified the query...instead of pulling the Campaign Summary UI endpoint I leveraged the Instance function
= #"MailChimp Instance"("/reports?since_send_time=2014-01-01&count=500")
It gives me the same number of results after I remove the error rows and the rows with "sent_time" = blank
I'm experiencing a similar issue with this. It is odd, because the query did worked two weeks ago and stop doing it without any changes on it when I updated the data manually this week. The difference with the OP is that I don't get the error on Power Query editor, but afterwards when updating the data.
The error is the following:
My user interface is set to Spanish, but the message translates to "Error of OLE DB or ODBC: [Expression.Error] The field 'list_stats' was not found on the registry."
I tried the accepted solution, but then I'm unable to run the query. So, this workaround does not seem to be working anymore (at least for my data).
EDIT: I find the solution to my issue and (I think) the one from the OP. This error appears because one or more rows failed to load the record value for the 'list_stats' column, so I just added to my query the following code:
#"Remove errors" = Table.RemoveRowsWithErrors(#"QueryName", {"id"})
before the in #"QueryName"
With this your query should run correctly.
Hi @pvazig I know this reply is very late. Since there’s no built-in connector for Mailchimp to PBI anymore, you will have to look for another way. As a workaround, maybe you can use a 3rd party connector, it can save you a lot of time compared to other options. I've tried windsor.ai, supermetrics and funnel.io. I stayed with windsor because it is much cheaper so just to let you know other options. In case you wonder, to make the connection first search for the Mailchimp connector in the data sources list:
After that, you will have to first create a secret API key in your Mailchimp account and then using your credentials add your account to the platform.
Once you’ve done this, you can proceed and go to the “Preview and destination” step
There just select the fields you need. Finally, just select PBI as your data destination and finally just copy and paste the url on PBI --> Get Data --> Web --> Paste the url.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |