Forum Discussion
COUNT and difference
- Anonymous4 years ago
Hi robertosangi ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want.
1. Create relationships between Wn, Wn-1 and Person table base on the field Person just as below screenshot
2. Create two measures as below to get the count of cases in Wn and Wn-1
Wn = COUNT('Wn'[#Case])Wn-1 = COUNT('Wn-1'[#Case])3. Create a measure as below to get the difference between Wn and Wn-1
Difference = [Wn]-[Wn-1]4. Create a table visual as below screenshot
Best Regards
robertosangi , Join both of them with person Table
Then
wn -1 cases =sum( 'Wn-1'[Cases#])
wn cases =sum( 'Wn'[Cases#])
diff = [wn -1 cases] -[wn cases]
Use common person table to display data
amitchandak I think is not easy as you said. I need to firstòy construct Columns "I" and "J" dynamically for each person. How I could do that? That's the main question.
I mean, for each row of the Person Table I need to have only the count of the relative amount of cases.
Just to be more clear.
Let's take Person A and B example.
In Wn-1 A had 1 case, B had 9 cases
In Wn A had 1 case again, B had 3 cases
I want in total 0 for A and -6 for B which means that A didn't work and B solved 6 cases respect to the previous week.
Building the columns as you said I will have the total amount of Cases and not divided by person
- Anonymous4 years agoNot applicable
Hi robertosangi ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want.
1. Create relationships between Wn, Wn-1 and Person table base on the field Person just as below screenshot
2. Create two measures as below to get the count of cases in Wn and Wn-1
Wn = COUNT('Wn'[#Case])Wn-1 = COUNT('Wn-1'[#Case])3. Create a measure as below to get the difference between Wn and Wn-1
Difference = [Wn]-[Wn-1]4. Create a table visual as below screenshot
Best Regards
- robertosangi4 years agoHelper I
Thank you. This is what I meant!