Forum Discussion
Anonymous
5 years agoNot applicable
Direct Query Table Relationship Not Functioning As Expected
I am trying to recreate some data I had been able to extract in Import mode, but instead using Direct Queries. In this instance, I have two tables containing hopefully unique values. Currently, they...
- 5 years ago
Hi Anonymous ,
You may change the formula like DAX below, and make sure the Cross filter direction of relationship between the two tables as Both.
WO's in Engineering and IMOS = CALCULATE ( DISTINCTCOUNT ( 'TRADESOFT - WO'[WoNbr] ), FILTER ( 'TRADESOFT - WO', 'TRADESOFT - WO'[WorkOrdStatusNbr] = 1 && 'TRADESOFT - WO'[WorkOrdTypeNbr] = 2 ), FILTER ( 'TRADESOFT - JOBS', 'TRADESOFT - JOBS'[JobStatusNbr] = 2 ), FILTER ( 'IMOS - PROADMIN', ISBLANK ( 'IMOS - PROADMIN'[WoNbr] ) = FALSE () && 'IMOS - PROADMIN'[WoNbr] = RELATED ( 'TRADESOFT - WO'[WoNbr] ) ) )Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-xicai
Community Support
5 years agoHi Anonymous ,
You may change the formula like DAX below, and make sure the Cross filter direction of relationship between the two tables as Both.
WO's in Engineering and IMOS =
CALCULATE (
DISTINCTCOUNT ( 'TRADESOFT - WO'[WoNbr] ),
FILTER (
'TRADESOFT - WO',
'TRADESOFT - WO'[WorkOrdStatusNbr] = 1
&& 'TRADESOFT - WO'[WorkOrdTypeNbr] = 2
),
FILTER ( 'TRADESOFT - JOBS', 'TRADESOFT - JOBS'[JobStatusNbr] = 2 ),
FILTER (
'IMOS - PROADMIN',
ISBLANK ( 'IMOS - PROADMIN'[WoNbr] ) = FALSE ()
&& 'IMOS - PROADMIN'[WoNbr] = RELATED ( 'TRADESOFT - WO'[WoNbr] )
)
)
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.