Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
yanivvl0
Creator III
Creator III

How to sum the last value for all the members - prev prev the selected year (with filter) prev prev ?

hi again to all members , i have to say that i am getting from you great help and also learn the important attitude how to see things and solve problems - Thanks !

i have Another requirement for the customer - in addition to what the previous discussion deceased see https://community.qlik.com/thread/211350?sr=inbox

i have to make all the calculation also to the previous year which is selected , so , if i select 2015 i need to show in one textbox all the calculate Relating to the years before 2015 - this is the current situation , AND  in the seccond textbox i need to show exactly the same thing but like i chose the year 2014 , thanks.

1 Solution

Accepted Solutions
sunny_talwar

May be this:

=Sum({<P_NO_1=P({<STATUS_1={90}, YEAR_STATUS_DATE_1={'<$(=Max(YEAR_STATUS_DATE_1)-1)'}>}P_NO_1), YEAR_STATUS_DATE_1={'<$(=Max(YEAR_STATUS_DATE_1)-1)'}>}

Aggr(FirstSortedValue({<YEAR_STATUS_DATE_1={'<$(=Max(YEAR_STATUS_DATE_1)-1)'}>}UnitsForMetsai, -YEAR_STATUS_DATE_1),P_NO_1))


Capture.PNG

View solution in original post

4 Replies
sunny_talwar

May be this:

=Sum({<P_NO_1=P({<STATUS_1={90}, YEAR_STATUS_DATE_1={'<$(=Max(YEAR_STATUS_DATE_1)-1)'}>}P_NO_1), YEAR_STATUS_DATE_1={'<$(=Max(YEAR_STATUS_DATE_1)-1)'}>}

Aggr(FirstSortedValue({<YEAR_STATUS_DATE_1={'<$(=Max(YEAR_STATUS_DATE_1)-1)'}>}UnitsForMetsai, -YEAR_STATUS_DATE_1),P_NO_1))


Capture.PNG

Anonymous
Not applicable

=Sum({<P_NO_1=P({<STATUS_1={90}, YEAR_STATUS_DATE_1={'<$(=Max(YEAR_STATUS_DATE_1)-1)'}>}P_NO_1), YEAR_STATUS_DATE_1={'<$(=Max(YEAR_STATUS_DATE_1)-1)'}>}

Aggr(FirstSortedValue({<YEAR_STATUS_DATE_1={'<$(=Max(YEAR_STATUS_DATE_1)-1)'}>}UnitsForMetsai, -YEAR_STATUS_DATE_1),P_NO_1))

yanivvl0
Creator III
Creator III
Author

hello Sunny , A huge thank you, appreciate you here much !!

yanivvl0
Creator III
Creator III
Author

hi Gupta - thanks 4 your help !!