Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

Problem with calculated dimension

Hello,

I have a graph with following dimensions :

IMSI and Timers

and 1 expression named percentile :

=if(RowNo(TOTAL)<IMSI_decile1,10,

if(RowNo(TOTAL)>=IMSI_decile1 and RowNo(TOTAL)<IMSI_decile2,20,

if(RowNo(TOTAL)>=IMSI_decile2 and RowNo(TOTAL)<IMSI_decile3,30,

if(RowNo(TOTAL)>=IMSI_decile3 and RowNo(TOTAL)<IMSI_decile4,40,

if(RowNo(TOTAL)>=IMSI_decile4 and RowNo(TOTAL)<IMSI_decile5,50,

if(RowNo(TOTAL)>=IMSI_decile5 and RowNo(TOTAL)<IMSI_decile6,60,

if(RowNo(TOTAL)>=IMSI_decile6 and RowNo(TOTAL)<IMSI_decile7,70,

if(RowNo(TOTAL)>=IMSI_decile7 and RowNo(TOTAL)<IMSI_decile8,80,

if(RowNo(TOTAL)>=IMSI_decile8 and RowNo(TOTAL)<IMSI_decile9,90,

if(RowNo(TOTAL)>=IMSI_decile9 and RowNo(TOTAL)<IMSI_decile10,100)

)))))))))

The variable IMSI_decile* are defined as follows :

IMSI_decile1=ceil(count(timers)/10)

IMSI_decile2=ceil(count(timers)/10*2)

IMSI_decile3=ceil(count(timers)/10*3)

etc...

This works perfectly.

Now I want to build another graph, with basically the same datas. I want to use the expression named "percentile" in previous graph as a dimension, and the expressions would be the average of the timers per percentile.

But when I define percentile as a dimension, it doesn't work.

Would anyone have an idea ? I'm quite new to QlikView and I don't really know how to solve this problem...

Maybe a solution would be to create a graph based on the datas calculated with another graph (using some kind of references...), but is it possible to do that ?

Regards,

Cyrille

4 Replies
Not applicable

Problem with calculated dimension

Any idea ?

richard_chilvers
Valued Contributor

Problem with calculated dimension

Hi

I believe that calculated dimensions can cause unexpected results. I'm sure I have read before that they should be avoided, although the latest releases may have resolved that.

It is preferable to create calculated fields (such as your field 'percentile') in the load script, if this is possible ?

I do not think you can refer to expressions from one object in another - if that is what your'e suggesting.

Regards

Not applicable

Problem with calculated dimension

Hi Richard,

Thanks for your reply.

I think I can not create calculated fields in the load script, because then these fields would not change dynamically depending on what is currently selected. Maybe I am wrong ?

Regards

richard_chilvers
Valued Contributor

Problem with calculated dimension

Hi

If I have understood your application, you can calculate your percentile in the script.

When you use it in your chart graph, the calculation will already have been done and will be subject to any filtering that you select.

It might be worth trying a test.

But perhaps I haven't understood ?

Regards