I am trying to create a calculated field like the below.
but it gives me an error on aggregate and non aggregate values.
Can someone help?
if (COUNTD([Category])=1 then [Sub-Category]
else [Category] END
Note: I am using the super store data. So when a user selects a filter in the quick filter for category, I was hoping that the countd becomes one and shows sub category as rows in the table instead of category.