Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
POST Body:
Solved! Go to Solution.
Hi @weiyu_chen ,
I checked some of the relevant restrictions and it seems that none of them are touched on your side...
- Only 1 DAX query can be executed per REST API request.
- Each DAX query can have only 1 result set.
- Result sets are capped at 100k rows.
- Supported data types: string, numeric, boolean, blank, datetime and variant. Binary is not supported.
- Azure AS and SSAS do not support this DAX REST API.
Is it possible that the error is reported because this DAX Query returned a single value, but the required return result here is a table? Change the DAX Query to the following form and see if it works:
{
"query": "EVALUATE SUMMARIZE (
'Activity',
\"countofpriority\", COUNTAX ( FILTER ( 'Activity', [Activity Status] = \"Completed\" ), [Priority] )
)"
}
Best Regards
Hi @weiyu_chen ,
According to this official blog, its escape character is a backslash (\”). So I think your initial writeup should be correct...
@weiyu_chen wrote:
POST Body:
{"queries": [{"query": "EVALUATE COUNTAX(FILTER('Activity',[Activity Status]=\"Completed\"), [Priority])"}],....
Please check if you enable Allow XMLA endpoints and Analyze in Excel with on-premises datasets under the tenant-level setting tab in the Power BI admin portal. Besides that, you need the Build permission for the dataset if you want to query by using this new REST API.
Best Regards
@v-yiruan-msft Thanks for the reply. Yes, I have enabled XMLA:
Also I am the owner of the dataset. I can access it. The problem is within FILTER function, I have this issue. But in the following query in SUMMERIZE function, it's OK:
Hi @weiyu_chen ,
I checked some of the relevant restrictions and it seems that none of them are touched on your side...
- Only 1 DAX query can be executed per REST API request.
- Each DAX query can have only 1 result set.
- Result sets are capped at 100k rows.
- Supported data types: string, numeric, boolean, blank, datetime and variant. Binary is not supported.
- Azure AS and SSAS do not support this DAX REST API.
Is it possible that the error is reported because this DAX Query returned a single value, but the required return result here is a table? Change the DAX Query to the following form and see if it works:
{
"query": "EVALUATE SUMMARIZE (
'Activity',
\"countofpriority\", COUNTAX ( FILTER ( 'Activity', [Activity Status] = \"Completed\" ), [Priority] )
)"
}
Best Regards
Thanks for the reply. I have tried your suggestion, get the following error:
You can try
"query": "EVALUATE COUNTAX(FILTER('Activity',[Activity Status]=""Completed""), [Priority])"
Also tried:
Can you confirm that your original query runs in DAX Studio?
@lbendlin I have run the following query (measurement) in Power BI desktop without any issue:
Subcategory Cound = COUNTAX(FILTER(ProductSubcategory,[ProductSubcategory] = "Fans"),[ProductSubcategoryKey])
Thanks!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
2 | |
1 | |
1 | |
1 |