Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Trouble using set analysis in a calculated dimension

Hello,

I'm trying to use set analysis within calculated dimensions in a pivot chart to get group descriptions, however they keep coming back with errors.

Here is an example of one of my calculated dimensions

=Only({<Category = {'Group1'}>} Description)

In another dimension I'll have this:

=Only({<Category = {'Group2'}>} Description)

If I use the IF function, I seem to get what I'm looking for, but I've been told it's not best practice to use if statements within calculated dimension.

1 Solution

Accepted Solutions
krishna_2644
Specialist III
Specialist III

Did you aggregate with respect to the other dimensions used in the chart/

Try:

AGGR( Only({<Category = {'Group1'}>} Description) ,ChartDimension2,ChartDimension3)

Other expr:

AGGR( Only({<Category = {'Group2'}>} Description) ,ChartDimension2,ChartDimension3)

View solution in original post

3 Replies
krishna_2644
Specialist III
Specialist III

Did you aggregate with respect to the other dimensions used in the chart/

Try:

AGGR( Only({<Category = {'Group1'}>} Description) ,ChartDimension2,ChartDimension3)

Other expr:

AGGR( Only({<Category = {'Group2'}>} Description) ,ChartDimension2,ChartDimension3)

Anonymous
Not applicable
Author

This is what I was missing.  I didn't know that I had to use aggregation with respect to all the other dimensions in the chart.

Thank you Krishna.

krishna_2644
Specialist III
Specialist III

Awesome.

Happy Qliking