Create a count feild for matches

Hey, I have this data…

I want to calculate the number of matching records in mlcategorytype and hbcscategorytype. Then display it below the chart…

For the below example,

matches = 0 for both empty + 326,502 for REGULATED + 2,695,128 for UNREGULATED

matches = 3,021,630

or get a column if {mlcategory} = {hbcscategory} , then consider {count} otherwise it is 0.

What should be my equation?

Hi

So if you did a calculated field:

ifelse({mlcategory} = {hbcscategory},1,0)

This would give you the number of matches which could be displayed in a separate visual.

Or if you added that as an additional column and filtered your pivot table for new column = 1, then add a total, you’d see the number in the same visual.

Let me know if you have any questions.