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

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.

Reply
dc189
Helper II
Helper II

Checking allow unrestricted measures in direct query does not work

Hello,

 

I am again facing a similar problem in a direct query model. Please see screenshot below. I have checked the "allow unrestricted measures" option but DAX is still not accepting the Calculate function. What's surprising is, DAX accepted the same Calculate function in a different table, but in this table, it is not. I tried using this formula both as a new measure and as a new column, but none worked. In a new measure, it does not accept the Earlier function and in a new column it does not accept any of the redlined functions shown below. Please help as this discrepancy is a big hurdle in an important assignment I'm on. Thank you, dc189.

 

Capture.JPG

 

2 REPLIES 2
v-qiuyu-msft
Community Support
Community Support

Hi @dc189,

 

Based on my test, CALCULATE() function doesn't support in calculated column in DirectQuery mode, but it's available in a measure. In your scenario, as you are creating a calculated column instead of measure, just as the error message said, it's not supported.

 

Best Regards,
Qiuyun Yu

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

Hi @v-qiuyu-msft,

 

Thanks for your reply. The reason I'm using a new column and not new measure is I need an image URL for each product category and URLs are not measures. My direct query formula looks like = IF(Category = "Boots", <Boots Image URL>, if(...)). I'm doing this for about 20 product categories.

 

Unfortunately, direct query does not accept IF statements for columns.

 

Do you know a way out of this?

 

Thanks,

dc189

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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