Forum Discussion
Userelationship returns wrong results
- 8 years ago
Hi riic0,
You need to have two measures one for open incidents and another for closed incidents in terms of relationships you need to have one of two options:
1) Linked the table by one active relationship and another inactive
2) Linked both table by inactive relationship
In option 1) you need to have one measure that make the normal calculation based on date and another one with the user relationship
In option2) both measure should be calculated based on userrelationship
The formulas should be something like this:
Close Cases = CALCULATE(COUNT(Table1[S]), USERELATIONSHIP('Calendar'[Date],Table1[End date]))In the images below you have the image that show equal versions with and withou active relationship.
As you can sse in the second image when I make the inactive connection the measure having the userrelationship gives correct results the one for active relationships returns 6 for all columns:
Rawa Data:
Option 1) active relationship on open dates:
Option 2) inactive relationship
My measure are simply ones but you can add the filters and all the other complexity and should work.
Regards,
MFelix
Hi Abduvali,
I want to count the closed and opened incidents for each month and show it in one graph so I can compare them.
If I use an column chart for example, I will put the month from the the date table on the Axis. That way it shows the results for each month. If I use the date from the incidents table then I have to choose between the opening date and the closing date. Which both returns wrong results, because for example when I use the Open date it counts the closed incidents on the date from when they were opened.
I hope this makes sense.
Maybe what i'm trying to do is wrong.