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

Set Analysis formula expanation

Hi All,

I have gone through the set analysis threads. Even though I have some doubts.

Could you help me the below code what does it do?

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

Thanks in advance.

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

This will give you Total Sales for the Max Year (or Max Selected Year) plus the Previous Year..and the result will be divided by vCurrecy Variable to convert to the respective currency.

If your data model has data from year 2010 to 2014.. and there is not selection at all for year, you will get total sales for Year 2013 and 2014 but if user has selected year 2012, you will get sales of 2012 and 2011.

Hope this will helps..

Happy Qliking...!

View solution in original post

5 Replies
mdmukramali
Specialist III
Specialist III

Dear,

The Below Expression will give the sales of the Max Year and Previous Year

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

Thanks,

Mukram

MK_QSL
MVP
MVP

This will give you Total Sales for the Max Year (or Max Selected Year) plus the Previous Year..and the result will be divided by vCurrecy Variable to convert to the respective currency.

If your data model has data from year 2010 to 2014.. and there is not selection at all for year, you will get total sales for Year 2013 and 2014 but if user has selected year 2012, you will get sales of 2012 and 2011.

Hope this will helps..

Happy Qliking...!

Not applicable
Author

Many thanks

Not applicable
Author

Hi manish,

i have x-axis data liek 0-5,5-10,10-15...

i want show it in percentage like  0-5%,5-10%,10-15%....  how?

MK_QSL
MVP
MVP

@Manojqlik... kindly create separate thread and don't mix with someone else thread... Thanks