Forum Discussion
Surashaw
4 years agoFrequent Visitor
Crossfiltering doesn't work
Hello,
We are trying to navigate from Comp Org Table to OneforceUser's Table we are having issues with the direction of the relationship between the tables (below is the screenshot of the Data model)
Trying to calculate the trotal days for each employee with the below DAX expression.
When we try to plot the Country, WWID from a single table we get the correct value of tyhe Total Days for each employe.
But when we plot the vizual with Country from a different table (Comp Org Table) and the Total Days measure it crossfilters and give me the record for all WWID's present in the model and doesn't restrict it to a specific country.
I tried using the Crossfilter function buit its doens work in this situation.
Total Days AUX = Calculate(SUMX(VALUES('OneForce User'[OneForce User L1 WWID]),Calculate(If('Calculated Measure'[First Call Date AUX]>= 'Calculated Measure'[Start Date AUX],DATEDIFF([First Call Date AUX],'Calculated Measure'[End Date AUX],DAY),DATEDIFF('Calculated Measure'[Start Date AUX],'Calculated Measure'[End Date AUX],DAY)))))
We are trying to navigate from Comp Org Table to OneforceUser's Table we are having issues with the direction of the relationship between the tables (below is the screenshot of the Data model)
Trying to calculate the trotal days for each employee with the below DAX expression.
When we try to plot the Country, WWID from a single table we get the correct value of tyhe Total Days for each employe.
But when we plot the vizual with Country from a different table (Comp Org Table) and the Total Days measure it crossfilters and give me the record for all WWID's present in the model and doesn't restrict it to a specific country.
I tried using the Crossfilter function buit its doens work in this situation.
Total Days AUX = Calculate(SUMX(VALUES('OneForce User'[OneForce User L1 WWID]),Calculate(If('Calculated Measure'[First Call Date AUX]>= 'Calculated Measure'[Start Date AUX],DATEDIFF([First Call Date AUX],'Calculated Measure'[End Date AUX],DAY),DATEDIFF('Calculated Measure'[Start Date AUX],'Calculated Measure'[End Date AUX],DAY)))))
Total Days =
Calculate(SUMX(VALUES('OneForce User'[OneForce User L1 WWID]),'Calculated Measure'[Total Days AUX]))
It would be realy helpfull if someone can help us with a solution.
Regards
2 Replies
- johnt75Super User
Create a Country dimension table like
Country Table = DISTINCT( UNION( ALLNOBLANKROW('Comp Org'[Country]), ALLNOBLANKROW('OneForce User'[Country]) ))then link that new table to both 'OneForce User' and 'Comp Org', and use the country column from the new table in all visuals
- SurashawFrequent Visitor
Hello johnt75,
Thank you for your response.
Tried the approach but with this I get a constant value for all countries but that should not be the case here.
Regrads,