Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Getting the Expression name from a grouped Expression

Hi,

I have a chart which has two diffrent Expressions Grouped and kept as a cyclic expression against a Dimension, It has a Period as a Dimension and No of Apartments sold as one Expression and another one as Total Area Sold which is clubbed as a group and user uses teh cyclic button to select what he wants to see, where i am trying to show the selected expression in Chart Title , is this possible ? is there any function, i came across some function to show the cyclic dimension names , but is there any thing for Grouped expressions as well ? pls help me if you know this

regards

Jeswanth

9 Replies
natebrunner
New Contributor II

Re: Getting the Expression name from a grouped Expression

I'm wondering the same thing.

Not applicable

Re: Getting the Expression name from a grouped Expression

Jeswant:

Title in the chart can be achieved by:

1. Check "Show in Title" in general tab of chart properties.

2. Keep default in the text box (<use first expression label>) below the title chart.

The same works for title in caption but in QV 11. I am not sure which build has to be there.

Kiran.

natebrunner
New Contributor II

Re: Getting the Expression name from a grouped Expression

Here's my issue though.  I have a line chart with 3 dimensions in 1 group. Likewise, I have 2 dimensions that are also in 1 group. This gives me the flip button for both.


Now, I'd like to set 2 different reference lines depending on the expression. In order to do this, I need to be able to grab the expression name like I can for dimensions  in the function GetCurrentField(GROUP_NAME).

Is this not possible?

MVP
MVP

Re: Getting the Expression name from a grouped Expression

I don't think you can easily retrieve the expression label.

Maybe John's suggestions posted here

http://community.qlik.com/message/8097#8097

can help you. Basically you create another dimension group that will determine the expressions you are using (pick() the right expression by calling GetCurrentField( Expression_Group ))

Hope this helps,

Stefan

fkeuroglian
Honored Contributor

Re: Getting the Expression name from a grouped Expression

please check this

hope help

Fernando

Re: Getting the Expression name from a grouped Expression

With a macro like this and with using from variables as expression is it possible:

sub ShowExpressionsName

set chart = ActiveDocument.GetSheetObject("CH01")

set p = chart.GetProperties

set expr = p.Expressions.Item(0).Item(0).Data.ExpressionData

ActiveDocument.Variables("vExpression").SetContent expr.Definition.v,true

msgbox expr.Definition.v

end sub

See also APIGuide.qvw.

- Marcus

mahesh_agrawal
Contributor

Re: Getting the Expression name from a grouped Expression

Hi,

The window's title will get changed automatically based on selection of the expression. But this case is viable for all types of charts except Pivot and Straight Table.

Not applicable

Re: Getting the Expression name from a grouped Expression

Steps to show expression from Grouped Expression:

1) Enable Show title [ Chart Properties -> General -> Enable Show Title ]

2) Align Title to Left [ Chart Properties -> General -> Title Settings -> Left Horizontal Alignment ]

Hope this could solve your problem

Ramesh

sofiene_1920
New Contributor III

Re: Getting the Expression name from a grouped Expression

Bonjour,

Vous pouvez créer une table d'indicateur (ID, Expression_Name) et l'ajouter à votre model dans un premier stade.

Ensuite vous ajoutez un filtre d'expression dans votre dashboard, vous conditionnez l'affichage des expression par la sélection d'une expression dans ce filtre (ex : if(ID = 1 , sum(Chiffre),...)) ou bien dans le menu d'affichage conditionnel d'expression de l'objet (ID=1).

Enfin pour le titre vous mettez tous simplement  : =Expression_Name

Si vous comptez activer plusieurs expression au même temps : = concat (Expression_Name, ' | ')

Cdt,

KMS