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

Expresion based on a selection in a field

Hi,

I have a bar chart with the following expression:

=sum({<[ Acquisition Date]={'2012'} >}[Current Total Expenses])

Anybody can help me figuring out why it is not giving me the results based on the 2012.

I have the Acquisition Date in a list box and if I select 2012 the chart gives me the right nrs but if I dont select anything then it show me all values from 2012-2011-2010.

Thxs,

1 Solution

Accepted Solutions
Anonymous
Not applicable

=use something in inline with below expression

Sum({$<Year={'2012'}>}Sales

View solution in original post

12 Replies
MayilVahanan

Hi

     Is [Acquisition Date ] is year field?

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
alec1982
Specialist II
Specialist II
Author

Yes, it has thre values:

2012

2011

2010

Thxs,

MayilVahanan

Hi

     Can you post a sample? I don't know why not working..What are the dimension?

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Anonymous
Not applicable

=use something in inline with below expression

Sum({$<Year={'2012'}>}Sales

alec1982
Specialist II
Specialist II
Author

It didn't work.

Thxs,

Anonymous
Not applicable

what is format (datatype)of acqusition date field ......?

alec1982
Specialist II
Specialist II
Author

The field in the excel file  is like 10/23/2012

On loading the year I did :

year(Date(acqusition date)) as acqusition date

I have added this filed as a list box to my sheet. and created a table to show the dimenssion and [acqusition] date and [Current Total Expenses]. they all show in the right order.

but on the chart it is summing all values

alec1982
Specialist II
Specialist II
Author

I cannot post a sample.

The file is too big.

Thxs,

manojkvrajan
Luminary
Luminary

Set Analysis is not working and in addition $ symbol is missing in your expression. Did you try removing the quotes '' and enter the number directly? Please see if that works.

sum({$<[Acquisition Date]={2012} >}[Current Total Expenses])