Forum Discussion
Connecting Harvest API with PowerBI
- sbenzaquen5 years agoHelper I
Thank you mahoneypat . This is useful but when adding the custom column the following error gets prompt
Expression.Error: We cannot convert a value of type List to type Table.
Details:
Value=[List]
Type=[Type]What can I do to fix it?
Thanks,
Salvador
- mahoneypat5 years agoMicrosoft Employee
Can you share your M code from the Advanced Editor and/or an example of what your data look like at the step before the error?
Pat
- sbenzaquen5 years agoHelper I
Thanks mahoneypat . Here is the code:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i44FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
#"Changed Type" = List.Numbers(0,10,100),
#"Converted to Table" = Table.FromList(#"Changed Type", Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Added Custom" = Table.AddColumn(#"Converted to Table", "Custom", each Table.AddColumn(#"Changed Type", "Custom",each Json.Document(Web.Contents(BaseURL&"100"&[Column1]))))
in
#"Added Custom"Current Value of "BaseURL": "https://api.harvestapp.com/v2/time_entries?from=" & "2021-01-01&to=2021-07-31"&"access_token=184XXXX&account_id=105XXXX"