Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Incorrect filter context

Hello everyone,

 

I have a supposedly simple problem for which I have not yet found a solution, even here in the forum. What I have found out is that a filter context is probably not correct here.

In the following screenshot you can see the incorrect calculation of the total.


Here you can see the measure I use to calculate the total using Calculate with a few filters.

 

Let me know if you need further informations. 

 

Thanks in advance. 

 

Kind regards

Alex

  • Hey Anonymous ,

     

    are you creating a calculated column or measure?

    I'm wondering because, you do not use any aggregation function for ...[totalCost] and ...[Logg...]
    This is odd when you are creating a measure because a column reference without a row context requires an aggregation function.
    If you are creating a calculated column, then the formula looks even more because you use columns from three different tables without using RELATED or RELTATEDTABLE.

    Please provide more information about the object that you are trying to create: calculated column or measure?

    Nevertheless, information about the model is required, and the most important part: what is the expected result?

    Regards,
    Tom

1 Reply

  • Hey Anonymous ,

     

    are you creating a calculated column or measure?

    I'm wondering because, you do not use any aggregation function for ...[totalCost] and ...[Logg...]
    This is odd when you are creating a measure because a column reference without a row context requires an aggregation function.
    If you are creating a calculated column, then the formula looks even more because you use columns from three different tables without using RELATED or RELTATEDTABLE.

    Please provide more information about the object that you are trying to create: calculated column or measure?

    Nevertheless, information about the model is required, and the most important part: what is the expected result?

    Regards,
    Tom