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

Getting max field (On calculated field) while opening the Document

Hi Experts,

Gm!

I have a calculated Month field and below is my expression..

=if((right(Date(if(YDAY=Aggr( NODISTINCT Max({<CALENDAR_YEAR_MONTH_CD = ,YDAY = ,Month_Name = , Year_Name =>}YDAY),Month_Name, Year_Name),YDAY),'MM/DD/YYYY'),4) &

     lEFT(Date(if(YDAY=Aggr( NODISTINCT Max({<CALENDAR_YEAR_MONTH_CD = ,YDAY = ,Month_Name = , Year_Name =>}YDAY),Month_Name, Year_Name),YDAY),'MM/DD/YYYY'),2)) = CALENDAR_YEAR_MONTH_CD,

MonthName((if(YDAY=Aggr( NODISTINCT Max({<CALENDAR_YEAR_MONTH_CD = ,YDAY = ,Month_Name = , Year_Name =>}YDAY),Month_Name, Year_Name),YDAY))))

I see all the Months (No Issues)... Now my requirement is ... While opening the document , i need the max Month in this list box to be selected by default.. How can I?

33 Replies
bharani8
Creator III
Creator III
Author

With "=" sign also i added and tried in Field name.. No Luck

Anil_Babu_Samineni

Consider YDAY is the Field?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
bharani8
Creator III
Creator III
Author

Tried YDAY as Field name as well ..No Luck

Anil_Babu_Samineni

I assume, You need to understand the business, Where and what we are going to have. Because, There is simple expression called long expression with multi fields. And you are going to have Default Selection trigger from Long and you don't know which field is that to be calculated. This is the case, i have 2 approaches

1) Create Key from all dimensions used for like (YDAY & MonthName & ....) as Field in your assignment of trigger

2) Create Primary key for that, If you have one primary key called any Seq. order / Date field try to test those field names as field of your trigger to get into with different field for 2 times ..

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
bharani8
Creator III
Creator III
Author

Ok.. Cant we add this expression as Variable ? and Calling that variable at the time of opening the Document ?

Anil_Babu_Samineni

with variable, I believe the same we have done earlier. Not entirely sure whether this can be done using variable. Can you please share application so then i will check after reach home for sure. Will update you soon ..

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
bharani8
Creator III
Creator III
Author

Hi Anil - I have deleted all the data except the ones which belong to Date field... U can find both QVD and QVW attached...

Requirement : In my qvw file.. when i open the document... I want the Max month to be selected and should reflect in Green color (As qlikview does)

Anil_Babu_Samineni

Which sheet and Which object we are talking about? And you said, You already tried in text box. Can you guide me

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
bharani8
Creator III
Creator III
Author

Initial sheet (Main)...

This is the Month field am trying to..Capture123322321.PNG

Anil_Babu_Samineni

Bit interesting, Let me invite stalwar1

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful