Parsing Parameter in Dataflow issue

Nandan Hegde 29,996 Reputation points MVP

Hello All,
Good day!

I was referring the below steps for extracting data from Powerbi:

Now I need to update the query from EVALUATE VALUES(Date) to the below query :
Evaluate SUMMARIZECOLUMNS( 'Date'[DateDimId], 'Date'[MonthNm], "CountRows",CALCULATE(COUNTROWS('Date')))

The new query contains both single and double quotes.

This new query works fine when executed via web activity :


Now the same query : "Evaluate SUMMARIZECOLUMNS( 'Date'[DateDimId], 'Date'[MonthNm], "CountRows",CALCULATE(COUNTROWS('Date')))" needs to be executed in dataflow REST API

Since it contains both single and double quotes :

we need to pass the parameter as below leveraging the escape character to resolve the parameter issue

"Evaluate SUMMARIZECOLUMNS( 'Date'[DateDimId], 'Date'[MonthNm], \"CountRows\",CALCULATE(COUNTROWS('Date')))"

But when we try about importing the projection , it fails with the below issue:

So how to handle the queries that contain both single and double quotes in dataflow activity?
What is it that I am missing out ?

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,553 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,893 questions
{count} votes

Accepted answer
  1. Balamurugan Balakreshnan 86 Reputation points Microsoft Employee

    Below will fix the issue
    escape("Evaluate SUMMARIZECOLUMNS( 'Date'[DateDimId], 'Date'[MonthNm], \"CountRows\",CALCULATE(COUNTROWS('Date')))", 'json')

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful