Forum Discussion
Related function not working
If you are not sure if Direct Query vs Import is causing an issue, try switching BOTH queries to Import and try it.
Basically, if you are on the MANY side of a 1-to-many relationship, you should be able to create a calculated COLUMN with the RELATED() DAX function as long as there is an active relationship line between the two tables.
Hi Todd,
Thank you very much for this information. Here are the details of the relationship:
So I am trying to create the calculated column in the CVCS table. When I just try to do a simple RELATED() function without any nested IFs, I still get an error:
I'm not too sure where to go from here. Per the original designer of the report, we need to use DirectQuery as it is a HANA data source so they do not want to import the data. However, I have been thinking of trying to import the data on my own to see if that does fix the issue but it will be a bigger change.
- ToddChitt5 years agoSuper User
Since Power BI is an in-memory tool, when you create a calculated column like you are trying (and it looks like everything is done correctly here) then Power BI will go through every record in the table, resolve that function to get a value, then push that resulting data up into memory.
But since the table it is goin against is Direct Query (is that right, or is it the other way around?) it may NOT be able to resolve the function.
Try a simple test with both tables, with limited data, doing Import. Then try the same data but with Direct Query. The results of those tests should tell you something.
- Wibson939 months agoFrequent Visitor
Utilizer a opção atualizar que irá resolver o problema de não está aparecendo