Forum Discussion
Relationship does not recognize same value.
Hello,
I have an issue i can not get my head around. I have 2 tables; Resources and ResourceRollen (roles) With a relation between the two:
Inside these tables i have the following values:
IsResourceActive is a calculated column, like this:
IsResourceActive = IF(RELATED(ResourceRollen[ResourceRollen]) = Resources[Resource Name],1,0)
I would expect a 1 at all of these values. But apparently it cant link Omgevingsmanager grondzaken to Omgevingsmanager grondzaken.
Both fields are text fields.
It has to be a calculated column and not a measure, because i need the field in page filters.
Anyone an idea?
- Anonymous6 years ago
Did you check for any extra spaces in the other table? Sometimes, it happens. If possible count the characters of both the tablefields to see if it matches.
6 Replies
- amitchandakSuper User
Anonymous , seems fine. Try like
IsResourceActive = IF(countx(filter(Resources, ResourceRollen[ResourceRollen] = Resources[Resource Name]),Resources[Resource Name])>=1,1,0)
You might have to swap Resources and ResourceRollen in the above calculation as per need like
new column in the resource table
IsResourceActive = IF(countx(filter(ResourceRollen, ResourceRollen[ResourceRollen] = Resources[Resource Name]),ResourceRollen[Resource Name])>=1,1,0)
- AnonymousNot applicable
Hi amitchandak thank you for your suggestions.
When i try the first suggestion, i had to change it to this:
IsResourceActive = IF(countx(filter(Resources, RELATED(ResourceRollen[ResourceRollen]) = Resources[Resource Name]),Resources[Resource Name])>=1,1,0)This gives a 1 on every field, even if it is not in resourcerollen.
The second one i changed to this:IsResourceActive = IF(countx(filter(ResourceRollen, ResourceRollen[ResourceRollen] = Resources[Resource Name]),RELATED(ResourceRollen[ResourceRollen]))>=1,1,0)I added related, because else it cant recoqnize the column there. But i get the same result.
I went further and tried this:IsResourceActive = IF(countx(filter(ResourceRollen, ResourceRollen[ResourceRollen] = Resources[Resource Name]),Resources[Resource Name])>=1,1,0)It also gives the same result.
Unfortunately no solution yet.
- AnonymousNot applicable
Hi Anonymous ,
It works fine on my side. Can you share your file if you don't have any Confidential Information?
Best Regards,
Jay
- AnonymousNot applicable
Yeh, i have the same.. When i try to recreate the data it works fine. But when i load it in from the database i get this stuff.. Its so wierd.
So unfortunately no sample data is possible, sorry.- AnonymousNot applicable
Did you check for any extra spaces in the other table? Sometimes, it happens. If possible count the characters of both the tablefields to see if it matches.