Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

JSON and Direct Query

Hi PBI Community, 

I need some assistance, I am trying to parse JSON out of a column. The current connection type is Direct query to an SQL server. Unfortunatly because of this connection type i cannot use the "transform function" in the query editor to quickly parse out the JSON. 

What options do i have while still remaining connected via direct query? 

 

 

Data looks like
 JSON.PNG

1 ACCEPTED SOLUTION
v-yuezhe-msft
Microsoft Employee
Microsoft Employee

@Anonymous,

Instead of parsing JSON in Power BI Desktop, using SQL statement to combine relational rows and JSON elements with CROSS APPLY and OPENJSON() functions during the import process, then import all the data.

For moredetails about query JSON data using T-SQL, please review the following articles.

https://docs.microsoft.com/en-us/sql/t-sql/functions/openjson-transact-sql
https://sqlwithmanoj.com/2015/11/02/store-json-data-in-a-table-openjson-and-json_value-functions-sql-server-2016-part-4/


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

To clarify the direction I took for any readers of this in the future, I ended up switching the data connection type to import in order to gain full power query and dax functionality which will enable me to use "Path" and "Pathitem". 

Cheers

v-yuezhe-msft
Microsoft Employee
Microsoft Employee

@Anonymous,

Instead of parsing JSON in Power BI Desktop, using SQL statement to combine relational rows and JSON elements with CROSS APPLY and OPENJSON() functions during the import process, then import all the data.

For moredetails about query JSON data using T-SQL, please review the following articles.

https://docs.microsoft.com/en-us/sql/t-sql/functions/openjson-transact-sql
https://sqlwithmanoj.com/2015/11/02/store-json-data-in-a-table-openjson-and-json_value-functions-sql-server-2016-part-4/


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,

 

I have same problem but we are using DirectQuery into BigQuery tables, which I don't have access to how the column is parsed. Is there some other solution to working with JSON in a DirectQuery column, apart from string manipulation in DAX?

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.