Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

How to specify string without quotes

Hello - I need to create a DAX expression which captures a string (highlighted red below), but doesn't actually use double quotation marks. Is there a way i can do this? (example of hypothetical solution - populationNY = .... , Geography[State] =String(NY))

 

populationNY = CALCULATE(SUM(Geography[Population]), Geography[State] = "NY")
  • Anonymous's avatar
    Anonymous
    6 years ago

    Found the answer - I wasn't properly escaping the double quotes when converting the file which contained my request body to a Json file. PBI accepted the request after fixing it

3 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      I'm using the Rest API to post a dataset that includes calculated fields. They key-value pairs for the measures are throwing back errors since the quotes in the DAX expressions are being interprated as the end of the value

      • Anonymous's avatar
        Anonymous
        Not applicable

        Found the answer - I wasn't properly escaping the double quotes when converting the file which contained my request body to a Json file. PBI accepted the request after fixing it