Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Femke_DPG
Contributor III
Contributor III

How to not filter on aggr dimensions in if statement?

Hi 

Is there a way to not filter on the dimensions, used in the aggregation sum in an if-statement? 

Example:

if([Sales type group]='A'
and aggr(sum(if([Media Name]='F' ,[Sales])),[Clean Product Name],Month,Year)<>0
and aggr(sum(if([Media Name]='G' ,[Sales])),[Clean Product Name],Month,Year)<>0
and aggr(sum(if([Media Name]='E' ,[Sales])),[Clean Product Name],Month,Year)<>0
and aggr(sum(if([Media Name]='A' ,[Sales])),[Clean Product Name],Month,Year)<>0
and aggr(sum(if([Media Name]='T' ,[Sales])),[Clean Product Name],Month,Year)<>0 ,'MIX' , 

if([Sales type group]='A'
and aggr(sum(if([Media Name]='F' ,[Sales])),[ Clean Product Name],Month,Year)=0
and aggr(sum(if([Media Name]='G' ,[Sales])),[Clean Product Name],Month,Year)<0
and aggr(sum(if([Media Name]='E' ,[Sales])),[Clean Product Name],Month,Year)>0
and aggr(sum(if([Media Name]='A' ,[Sales])),[Clean Product Name],Month,Year)>0
and aggr(sum(if([Media Name]='T' ,[Sales])),[Clean Product Name],Month,Year)>0 ,'MIX2' ))

When I filter on 'MIX'or MIX2, there are other filters that are applied above:

Femke_DPG_0-1653219035238.png

I think it filters on the values that are in the aggr statement.: year, month, product name (en sales type group is also in the if-statement). 

It only needs to show 'MIX', but it shows nearly everything, so also other mixes. 

Many thanks for the help! 

Appreciate your help! 

Thanks!

 

Labels (1)
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III


@Femke_DPG wrote:

It only needs to show 'MIX', but it shows nearly everything, so also other mixes. 

Since this is a calculated field created in the front end it doesn't exist in the data model as an actual "FIELD"

but is basically a combination of different field value filters

There is NO workaround for this, QlikSense will always show filters applied on fields that exist in datamodel and not calculated fields

 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

1 Reply
vinieme12
Champion III
Champion III


@Femke_DPG wrote:

It only needs to show 'MIX', but it shows nearly everything, so also other mixes. 

Since this is a calculated field created in the front end it doesn't exist in the data model as an actual "FIELD"

but is basically a combination of different field value filters

There is NO workaround for this, QlikSense will always show filters applied on fields that exist in datamodel and not calculated fields

 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.