Forum Discussion
Compare Count of String Between Two Tables Given a Status Column
- 3 years ago
Hi maibacherstr
Apologies for the late reply. Please refer to attached sample file.
please try
CALCULATE (
COUNTROWS ( TableA ),
TableA[Status] = "Operational"
)
Same for TableB
tamerj1 It seems like there are some gaps between this measure and being about to compare both counts, such that if there is a difference between the two, then the result of the measure enables a conditional format. What am I missing, please?
- tamerj14 years ago
Community Champion
Not sure I fully understand that. If the difference between the two measures equals 0 then "green" otherwise "red".
- maibacherstr4 years ago
Helper III
Hello tamerj1 I understand the fundamentals of the difference problem, but still the question of how specifically to implement it. How many measures will be used? If 1, will it require the =related() function to be used, or something like that? Thank you
- tamerj14 years ago
Community Champion
Hi maibacherstr
You can create a difference measure to be used in the conditional formating as followsTable A Operational = CALCULATE ( COUNTROWS ( 'TABLE A' ), 'TABLE A'[Status] = "Operational" )Table B Operational = CALCULATE ( COUNTROWS ( 'TABLE B' ), 'TABLE B'[Status] = "Operational" )Difference = [Table A Operational] - [Table B Operational]