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

experssion

Hi

can any one pls exlpain me

below experssion

Sum({$<Year={$(=Max(Year)),
$(=Max(Year)-1)}>}  Sales / $(vCurrency))

thanks

5 Replies
MayilVahanan

Hi

Its sum the sales for maximum year ans maximum year -1 and divide by currency variable value

for example.

Year

2009

2010

2011

2012

its sum the  2012 and 2011 year sales  and divide by variablevalue

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

Not applicable

hi, Set Analysis used in this expression. Explore about Set Analysis in community. There is a lot of information in community.

Regards

-Anil

srinivasa1
Creator II
Creator II
Author

Hi Thanks for your reply.

my data as below

Medical 30-Sep-12 50
Medical 30-Sep-12 50
  sum=100


Dental 31-Sep-2012 100
Dental 31-Sep-2012 100
  
  sum=200

Now i need to calcaulte 200-100=100 how i can achive this in qlikview by useing set analysis

thanks

Not applicable

Hi Srinivasa1,

First you have to understand basics of QlikView, like data management, basics of Set Analysis and how QlikView work.

QlikView load data distinctly, when the data source have two identical row then QlikView load single row only due its default behavior, rather than both row, if you need both row then you have use no distinct or other mechanism in load.

When you filtered data with the selection of a dimension and you want to calculate something beyond this selected dimension value then you need Set Analysis.

For example there is dimension in your data set say Year, and you chose Year : 2009 and you want to calculate sales value of year 2008 or 2009 then you need to use of Set Analysis.

In your case, suppose you selected Dental then you have to wright.

Sum(Value) – sum( { $ < Nature={‘Medical’} > } Value)

Hope it will help.

Regards

Anil