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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

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")
1 ACCEPTED SOLUTION
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

View solution in original post

3 REPLIES 3
stevedep
Memorable Member
Memorable Member
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
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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.