Forum Discussion
Need help comparing rows and after that counting
- Anonymous3 years ago
I managed to solve my problem using the method of the accepted solution in here . Just added one more filtering to the calculate.
As I told you earlier, the ouput column counts within a subject, how many name in the states of 2 or 3 are. Example : I have subject A with ABC-1 ABC-2 ABC-3 FEG-2 FEG-3 PRO-3 PRO-5. THe output column will count ABC one time, FEG one time & PRo 1 time, some the ouput will be 3 . Explenation is: It counts ABC one time cause even there are 2 ABC in my valid states, because it is the same name I want only 1 count not 2., same fot the others.
Hi Anonymous ,
As per my previous solution it will work ,
Type2:
| Subject | Name | State | Output |
| A | ABC | 2 | 1 - same output as the other for this subject |
| A | ABC | 1 | 1 - same output as the other for this subject |
| A | EFG | 7 | 1 - same output as the other for this subject |
| A | PRO | 5 | 1 - same output as the other for this subject |
| C | ABD | 2 | 2 - same output as the other for this subject |
| C | ABD | 3 | 2 - same output as the other for this subject |
| C | ABD | 4 | 2 - same output as the other for this subject |
| C | PRO | 2 | 2 - same output as the other for this subject |
So by this you wanted to calculate the count of ABC as 1, ABD as 1 and PRO as 1 as they are in 2 and 3 state. So below screenshot shows that only.
If you are looking for a output like this below, then follow the below steps.
1. you have to make a calculated column in the table , using the below dax.
Did I answer your question? Mark my post as a solution!
- Anonymous3 years agoNot applicable
So, I think I am not making myself very clear. I want the total count for that subkect to be displayed near it. Not only 1 or 0 cause it does not help me. This is a previous step of want I want to do further, for a filtering for Single or Multiple (Single= only one distinct name in the 2 or 3 status, Multiple= more than 1 distinct names in status 2 or 3)