Forum Discussion

FireAchan's avatar
FireAchan
Regular Visitor
2 years ago

Direct-Lake Error: file 'xmhierarchy.inl', line 93, function 'XMHierarchy::IsMaterialized'

Hi Community,

 

we are working with a dataset in Direct-Lake mode, but for the past couple of days, we've started to get the following error in our visuals: "[An unexpected error occurred (file 'xmhierarchy.inl', line 93, function 'XMHierarchy::IsMaterialized').]". After conducting some tests, it seems that the error is thrown by all measures that contain filter conditions using variables or table expressions. Some examples of such measures are:

 

 

 

 

Measure1 = CALCULATE(COUNT(table1), table1[col1] IN UNION(VALUES(table2[col1]), VALUES(table3[col5]))
Measure2 = VAR var1 = 'text' RETURN CALCULATE(COUNT(table1), table1[col2] = var1)

 

 

 

 

However, it seems that measures with filter conditions on constant values work correctly. Examples of this include:

 

 

 

Measure2 = CALCULATE(COUNT(table1), table1[col2] = 'text')

 

 

 

 

Another observation is that when I connect to the dataset with the issue using Power BI Desktop in live connection and replicate the measures with the same code as the ones causing the problem, they work correctly in this case. The dataset only throws the exception when the measure is embedded in it and not when it is injected from outside through a direct DAX query definition.

 

Can someone help us please?

2 Replies

  • I have the same error. 
    I cant get the measures to work when make the in the Desktop App
    but if i make the same measure in the semantic model via the editor in the service it fails