Background
I need to create a Power BI report/dashboard from data that is locked up in a tightly firewalled PostgreSQL database. Connecting Power BI directly to the DB is not an option. I can however access Python scripts running on the same server so it is fairly trivial to write a simple extract/transform script and present the data as either XML or JSON.
The problem
I'm a Power BI newbie and I can't figure out how to transform my data into tables in Power BI desktop
Here's an example Source Table for the standard sales demo
Month | Count
_____________
Jan | 100
Feb | 150
Mar | 200
...
And that's the table I want at the other end in Power BI
I've tried JSON:
{
data: {
sales: [
{Jan:100},
{Feb:150},
{Mar:200}
]
}
}
And I've tried XML:
<root>
<data>
<sales>
<period>
<month>Jan</month>
<count>100</count>
</period>
<period>
<month>Feb</month>
<count>100</count>
</period>
<period>
<month>Mar</month>
<count>200</count>
</period>
</sales>
</data>
</root>
Obviously this is a simplified version of the data I'm using but it illustrates the issue
I've tried to parse this using the UI. The data loads and I can drill down to the rows but can't figure out how to read in as a table - I end up with either a table of lists, a table with just one row or a table of tables