Forum Discussion
mrleijzer
Helper I
6 years agoUSERELATIONSHIP not working correctly
Hello all, I have two tables, Calendar and Projecttakken. There's a main active relationship between Calendar[Date] and Projecttakken[Boekdatum]. There's also an inactive relationship between C...
mrleijzer
Helper I
6 years agoBack to the drawing board...
Measure= CALCULATE(DISTINCTCOUNT(Projecttakken[Boeknummer])
works fine, 1073 records, just like I expected.
Measure= CALCULATE(DISTINCTCOUNT(Projecttakken[Boeknummer]);Statussen[Statuscategorie]="Vervallen")
works fine also, getting and expecting 3 records
So when I add USERELATIONSHIP
Measure=
CALCULATE(DISTINCTCOUNT(Projecttakken[Boeknummer]);Statussen[Statuscategorie]="Vervallen";USERELATIONSHIP('Calendar'[Date];Projecttakken[Gewijzigd]))
It's blank again, so there must be a relationship problem, but where?
v-lid-msft
Community Support
6 years agoHi mrleijzer ,
We can try to use the following measure to meet your requirement:
Measure =
CALCULATE (
COUNT ( Projecttakken[Boeknummer] );
FILTER (
ALLSELECTED ( Projecttakken );
Projecttakken[Gewijzigd]
IN FILTERS ( 'Calendar'[Date] )
&& RELATED ( Statussen[Statuscategorie] ) = "Vervallen"
)
)
If it does not work, could you please describe the relationship between Projecttakken and Statussen tables simply if it does not contain any confidential information?
Best regards,