Forum Discussion
Krijgersss
Helper II
2 years agodistinctcount with a related filter function
Hello i need some help i want to make a formule for distinctcount with a related function because i need to filter my distinctcount from a related table (see screenshot)
tamerj1
Community Champion
2 years agoHi Krijgersss
you can
Public Holidays =
SUMX (
Dim_Emplyee,
CALCULATE (
COUNTROWS ( Public_Holidays ),
USERELATIONSHIP ( Public_Holidays[Country], Dim_Employee[CountryCode] )
)
)- Krijgersss2 years ago
Helper II
i tried this but this gives me the same result it doesnt let the filter function work. it's the way the model is build i need to count from a dimension table and i need to filter from a fact tabel i tried using crossfilter but this gives me extreem loeding times and wrong values
- tamerj12 years ago
Community Champion
Please ignore my above solution. I have edited it by mistake and pasted a solution that was intended for another question in the forum.
I remember my original solution included summarizing the fact table by the dimension column. That should work unless there are more information that need to be provided. If you have an active one to many single direction relationship between the two tables, normally this should work.