While creating the following calculated field I am getting an error on aggregate and non aggregate values.
if (COUNTD([Category])=1 then [Sub-Category]
else [Category] END
Note: I am using the super store data-set. So when a user selects a filter in the quick filter for category, I was expecting that the countd becomes one and shows sub category as rows in the table instead of category.