Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

avastani
Contributor II

How to Obtain Chart Type information in an expression?

Has anyone tried to obtain the chart type in an expression.

I want to use 1 expression if it is a straight table and another expression if it is a pivot table in the same object using the fast change.

thanks in advance for your help.

3 Replies
Not applicable

How to Obtain Chart Type information in an expression?

Hello Amir

There's no function to get the chart type but you might be able to do what you want using the function secondarydimensionality().
From the helpfile: "The secondarydimensionality() function always returns 0 when used outside of pivot tables.

So, in your expression, you could write: if(secondarydimensionality()=0, straighTableExpr, pivotTableExpr)

Haven't tested it but it should work.

/Fredrik

avastani
Contributor II

How to Obtain Chart Type information in an expression?

Hi Fredrik,

That works, thanks! But now let me add a little complexity curve to it. How about I would like to view the same as a YTD, PYTD, Variance for rolling averages?

i.e. the expression is rangesum(before(sum(salesamount), 0, 3))

the before function fails because it isn't a trend table anymore but more so, the pivot table is just plain blank despite using secondarydimensionality()

any ideas? thanks again.

Not applicable

How to Obtain Chart Type information in an expression?

Hi

I don't quite follow you. Can you post an example application?

/Fredrik

Community Browser