Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Showing actual Filter Selection

Hi dear Comunity,

in my QlikSense app I want a way to export all of my current selected filters to an excel-table.

For my actual filters that works by using a table-objekt and adding every single possible filter as a Dimension to the table with the formula: GetFieldSelections([Dimension_Name],','&chr(13)&chr(10),300).

So my problem is that this way I can only show and export filters which are  fields. Because GetFieldSelections() seems to work only with field names. Until now I could calculate all Fields that are dimensions in charts and therofore possible filters in the Data Load Editor and therefore could use the GetFieldSelections() function.

But now I have to use the Aggr()function to calculate a field, that is a Dimension in one Chart, but you can not use the Aggr()-function in the Data Load Editor. Therefore I have to calclate the Field in the Chart and can not show it with the GetFieldSelections()function:

If( (Aggr(Sum(Rückstand),Date, KN_Nummer)/Aggr(Sum(Exposure),Bestandsdatum, KN_Nummer))*100 < 1,

                                '<1%',

If( (Aggr(Sum(Rückstand),Date, KN_Nummer)/Aggr(Sum(Exposure),Bestandsdatum, KN_Nummer))*100 < 2.5,

                                 '1-2,5%',

If( (Aggr(Sum(Rückstand),Date,, KN_Nummer)/Aggr(Sum(Exposure),Bestandsdatum, KN_Nummer))*100 >= 2.5,

                                 '>2,5%'

))))))

So my question is:

Is there a way to show the selected filters of calculated fields and to export them in a decent way ?

Or maybe could I use the GetFieldSelections()function somehow?

Thanks in advance. I hope I was able to express my problem.

ThorQlik

1 Solution

Accepted Solutions
sunny_talwar

The equivalent of Aggr() in script can be done using Group By statement. The reason I am telling you this is because AFAIK, you won't be able to use show this using selected filters or using GetFieldSelections(). There might be other ways, but they will have to played around with

View solution in original post

3 Replies
sunny_talwar

The equivalent of Aggr() in script can be done using Group By statement. The reason I am telling you this is because AFAIK, you won't be able to use show this using selected filters or using GetFieldSelections(). There might be other ways, but they will have to played around with

Not applicable
Author

Okay, so right now I calculate fields in the load Editor like this:

If([Konto_Rückstand]/[Konto_Exposure]*100 < 1,

                                '<1%',

If([Konto_Rückstand]/[Konto_Exposure]*100 < 2.5,

                                 '1-2,5%',

If([Konto_Rückstand]/[Konto_Exposure]*100 <5,

                                 '2,5-5%',

If([Konto_Rückstand]/[Konto_Exposure]*100 < 10,

                                 '5-10%',

If([Konto_Rückstand]/[Konto_Exposure]*100 < 100,

                                '10-99,9%',

If([Konto_Rückstand]/[Konto_Exposure]*100 >= 99.9,

                                 '100 %'

)))))) As [Rückstandscluster],

Similar I want to make another calculation  in the load script as I mentioned:

If( (Aggr(Sum(Rückstand),Date, KN_Nummer)/Aggr(Sum(Exposure),Bestandsdatum, KN_Nummer))*100 < 1,

                                '<1%',

If( (Aggr(Sum(Rückstand),Date, KN_Nummer)/Aggr(Sum(Exposure),Bestandsdatum, KN_Nummer))*100 < 2.5,

                                 '1-2,5%',

If( (Aggr(Sum(Rückstand),Date,, KN_Nummer)/Aggr(Sum(Exposure),Bestandsdatum, KN_Nummer))*100 >= 2.5,

                                 '>2,5%'

)))))) As [AnotherCluster],

So you said, it was possible to do that using the Group by function. That is great.

Unfortunately, I have no experience with the Group by function.

I would be delighted if you could tell me how to use it for my problem.

Not applicable
Author

alright, I solved it. Because of the needed fields coming from different tables I had to join and drop some tables, but now it works.

Thanks a lot for your help. Using Group by was not that difficult.