Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculated Dimension in Set Analysis

Hi all, just wondering if anybody can point me in the right direction.

I'm simply trying to use a calculated Dimension within Set analysis Expression to ignore any 'Section' filters, so if user filters by Section it won't filter the chart as 'Section' is not a direct dimension in the chart, tried a few things but no luck.

This is the current Expression and Calculated Dimension.

//Calculated Dimension used as filter

= if(FileType = '$(vR4_IntSwitch)',if(left(Section,1)='B','ELECTRICITY'),null())


//Need to include above to stop chart filtering on 'Section'
=
sum({<MonthYear=,Month=,Section=>}

aggr(sum({<SupplierName =,MonthYear=,Month=,Section=>}AdjustedMeasure),Month,MonthYear,SupplierGroup,FileType,

Section,Description)
)


Many thanks!

6 Replies
swuehl
MVP
MVP

Maybe try

=sum({<MonthYear=,Month=,Section=,FileType=>}

aggr(sum({<SupplierName=,MonthYear=,Month=,Section=,FileType=>}AdjustedMeasure),Month,MonthYear,SupplierGroup,FileType,

Section,Description)
)

Not applicable
Author

Hi, thanks for the try but that doesn't work either...

sunny_talwar

Why don't you create a new field in the script using your if statement and then use the new field for filtering? and then you ignore the selection in the new field.

Not applicable
Author

Hi, yes that is an option but I'm trying to avoid making any changes to the script at this stage as its pretty much finalised, also to be honest I'm trying to understand a bit more about calculated dimensions and see how this can be done in set analysis as I'm sure it won't be the first time I will come across this issue.

Any suggestions appreciated!

sunny_talwar

Is this the chart dimension or is this a list box expression?

Capture.PNG

If this the chart dimension may be this:

If(Only({<Section>} FileType) = '$(vR4_IntSwitch)',

If(Left(Only({<Section>} Section), 1) = 'B', 'ELECTRICITY'), Null())

swuehl
MVP
MVP

It would be easier to help if we get to know your setting a little better.

Could you upload a small sample QVW?