Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ksharpes
Creator
Creator

Can you use the chart title as part of a measure expression?

I have a number of small charts showing  top 15 items per Country and i have within the expression the Country hard coded in.

What I would like is that all of the charts are the same but all i would have to do is change the Title to make it show a different country. 

Would this be possible using the Title, or part of the title to define which countries data is shown?

The measure is currently:

Sum({1<[BU15]={'UK0101'},[Item Type15]={'Game(Dis)','Game(Pub)'}>}[Sales Qty (Ext)15])

So I would like to change 'UK0101' to the pull text from the Title field.

1 Solution

Accepted Solutions
ksharpes
Creator
Creator
Author

So I actually worked out a way to get around this.

Rather than use a Variable in my expression, i have used a StateName() and then created a statename for each of the options needed then assigned the state to the chart.

I am unsure of the impact it will have on the speed of the app as yet, but will report back if any issues arise.

The below is part of the expression I am using for reference:

Sum({1<[BU15]={"$(=Statename())"}>}[Sales Value] )

View solution in original post

5 Replies
Michael_Tarallo
Employee
Employee

Hi Ksharpes -

See attached video (.mp4) in this discussion thread. Please let me know if this is what you want to achieve? If not - we can elaborate from there.

Thanks
Mike Tarallo
Qlik

Regards,
Mike Tarallo
Qlik
ksharpes
Creator
Creator
Author

Thanks for you assistance, I appear to have not explained myself very well, What I want to achieve is, in my Measure Sum(Sales), I want to have a set analysis that is based off of the title for the chart

My set analysis currently would be: 

Sum({1<[BU15]={'UK0101'}>}[Sales])

So I would want to have UK0101 as the Chart title, and my Set Analysis, to point to the title; for the value to assign to BU15.

Does that make more sense?

Michael_Tarallo
Employee
Employee

I believe so - the chart title is not a reference-able object - but what about if you set a variable for the chart title and then reference the variable in the set analysis expression?

Regards,
Mike Tarallo
Qlik
ksharpes
Creator
Creator
Author

ah OK, I was hoping it would be able to be referenced.

The variable route wont really get me round the issue unfortunately but thanks for the help anyway.

ksharpes
Creator
Creator
Author

So I actually worked out a way to get around this.

Rather than use a Variable in my expression, i have used a StateName() and then created a statename for each of the options needed then assigned the state to the chart.

I am unsure of the impact it will have on the speed of the app as yet, but will report back if any issues arise.

The below is part of the expression I am using for reference:

Sum({1<[BU15]={"$(=Statename())"}>}[Sales Value] )