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

How to force to select a value belong the data model -by selecting from a table that stands alone

hi to all , i have a complicate model and in it i need to make a selection from stands alone field (table) A_year , the resault supose to be like i chose one of the fields from the model - YEAR_STATUS_DATE_1 , to be more clear - the expresion that in the textboxes must response to the selection ( you can see about the expresion  in the prev discussion - https://community.qlik.com/thread/211520?sr=inbox)

THANKS.

1 Solution

Accepted Solutions
sunny_talwar

Try these expressions:

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

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

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

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

Capture.PNG

View solution in original post

4 Replies
sunny_talwar

What would be a particular example? Lets say I select 2016 in A_year, then what would the text boxes (1 and 2) will be showing?

yanivvl0
Creator III
Creator III
Author

SOMETING LIKE THIS :

STANDALONE_YEAR.PNG

sunny_talwar

Try these expressions:

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

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

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

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

Capture.PNG

yanivvl0
Creator III
Creator III
Author

hi Sunny , We usually know what can be the solution to various problems, but your magic touch he finishes the job ... - Many thanks again !!