Forum Discussion

Ackbar-Learner's avatar
Ackbar-Learner
Resolver I
3 years ago
Solved

Relationship issue

Hi I am having a issue when filtering data by a table from Direct Query.

 

This is the DAX I wrote:

 

 

Board02aP&LAllTransactionAmountwithSignActual = 
VAR DateSelected = [Board01aLastDateSelected]
VAR Result = 
    sumx(GLChartOfAccounts,
        CALCULATE([P&LAllTransactionAmountEUR],
        FILTER(all(GLAccountClientUser[GLAccountValue]),GLAccountClientUser[GLAccountValue]<4700000),
        FILTER(BudgetCalendar,BudgetCalendar[Date]<=DateSelected))
        *GLChartOfAccounts[Sign])
RETURN
    Result

 

This is the result which is not being correctly filtered by each GL item:

 

 

Above is the relationship where the one table highlighted in blue is from a DirectQuery. There is also a calendar table not appearing in above screenshot which is related to the fact table called GLTransClient.

 

Hope any one can help!

  • The same number across a column is an indication for a data model issue.  Please familiarize yourself with the concept of dimension and fact tables, and then refactor your data model accordingly.

1 Reply

  • The same number across a column is an indication for a data model issue.  Please familiarize yourself with the concept of dimension and fact tables, and then refactor your data model accordingly.