Hi,
If anyone can help me with this - it would be really great.
I'm a newbie to Power Query, hence I have troubes with it.
I'm trying to excecute this code:
Let
Source = Xml.Tables(Web.Contents(https://api.*******.com/api/v13,
[Content = Text.ToBinary
<?xml version='1.0' encoding='UTF-8'?>
<call method="exportData" callerName="Export.xlsx">
<credentials login="******@****.com" password="*****"/>
<version name="FY2017-November V2" isDefault="false"/>
<format useInternalCodes="true" includeUnmappedItems="false"/>
<accounts>
<account code = ‘1234 Compensation’ isAssumption = ‘true’ includeDescendants = ‘true’/>
</accounts>
<filters>
<levels>
<level name = ‘AAAAAA Field Sales’ isRollup = ‘true’ includeDescendants = ‘true’/>
</levels>
<timeSpan start="Jan-2017" end="Feb-2017"/></filters>
<rules includeZeroRows="false" includeRollups="true" markInvalidValues="false" markBlanks="false"
timeRollups="single">
</rules>
</call>”)])
),
Output = Source[Output]
In
Output
I get the result as a one row List. Looks like this (three text fields, one value and the first four values are headers):
"Account Name", "Account Code", "Level Name", "Rollup" "1234 Materials", "1234", "Field Sales", 123.5 "5678 Reagents", "5678", "Inside Sales", 123.568 .......
Essentially, the first four values are headers, the next four values is record 1, the next - record 2, etc etc. After each value - there should be a new record.
The problem it's all in one row. When I transform it into Table - if I parse it with comma it creates as many columns as there are values. If I transform it into a table with delimiter "none" - it puts all values into one row-one column kind of thing.
How do I need to change the code so that the output of the query comes in multiple row (as many as there records), so I can parse it into columns?
Thank you,
ValGlad