Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
jessica_webb
Contributor III

Aggregation of expression around dimension

Hello,

I have a very large dataset presented in a table like this:

IDBinFrequencyTotal Frequency%
12341-53933
12346-104944
123411-152922
45671-581747
45676-1051729
456711-1541724

ID is a dimension

Bin is a calculated dimension: =Class(Score,5)

The rest are expressions:

Count(DISTINCT Ref)

AGGR(NODISTINCT Count(Ref),ID)

Count(DISTINCT Ref)/AGGR(NODISTINCT Count(Ref),ID)

What I would like is to create additional rows, for every possible 'Bin', where the frequency for all the IDs are totalled.

In my example above, it would create 3 additional rows like this:

01-5112642
06-1092635
011-1562623

Happy to do this within the table's expressions, or in script!

All help appreciated

4 Replies

Re: Aggregation of expression around dimension

You want this to be shown in the same table? Also, can you create the calculated dimension in the script like this

Class(Score, 5) as Bin

jessica_webb
Contributor III

Re: Aggregation of expression around dimension

Yes, would like it in the same table.

Calculating it in the script would probably help with the horrendous lagging I'm experiencing. Problem is '5' is actually a variable called 'BinWidth' which can be defined via an input box.

So I guess I couldn't do that if the calculation was occurring in the script

Re: Aggregation of expression around dimension

If there is a small range of numbers the user can enter, for example, the user will ever enter 2, 3, 5, 10, 20... then you can create 5 fields and then conditionally use them... makes life little easier with the expressions....

Anyways, coming back to the requirement ... you will have 0 as ID?

jessica_webb
Contributor III

Re: Aggregation of expression around dimension

I'll put that to the user as that might work better... Problem is, I think they'll be using decimals, so my possible range of numbers could be huge!

Yes, would like '0' as the ID. Apologies for not explaining all this properly in the initial message!