Forum Discussion

BlueRanger's avatar
BlueRanger
Frequent Visitor
2 years ago
Solved

Error Using RELATED with CALCULATE

Hello,

 

I am running into an error when using the related function and would appreciate any help!

 

Here is a snapshot of my data model:

 

 

I am running a count on the invoice lines table and using calculate to filter the count using the connecting dimension tables: item and invoice header.

 

Here is the DAX I am using for my measure:

 

As you can see, I am running into issues with the RELATED function which is causing my error. Is there a way to calculate a count on my fact table using filters from other dimension tables it is connected to?

Thanks!

  • BlueRanger's avatar
    BlueRanger
    2 years ago

    Greg_Deckler 

    Greg, thanks again for your help! I was able to solve the issue by changing my DAX calculation. Because of the direction of the relationships, RELATED was not needed.

4 Replies