Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Default view

Hi Friends,

How can i get difault view with maximum month value selected.

like when i open my report it should take maximum minth selected value to display the report..

can any one have any IDEA???

Regards,

Mahesh.G

5 Replies
Not applicable
Author

In QlikView, using the expression Max(Month) will give you the maximum selected month.

You can use this with Set Analysis. Something like:

Sum(Month={'$(=Max(Month))'}>} Sales)


That's just a general example, you would need to modify to work with your data and fields.

Not applicable
Author

thanks for the replay,

but i need something like when i open the report qlick view shoud select max month in a list box.

on first view of the report its should conatin the max month values. then i wanted to select other month in alist box.

i use 'Always one value selected' in general properties. but its a static solution.

but i need dynamic solution. if i updated with more data it should select max month value.

Regards,

Mahesh.G

Not applicable
Author

You could use a macro. Set up a variable with the value Max(Month) or whatever your month field is.

Then use a macro like:

Sub Test
maxMonth = ActiveDocument.Variables("NewVar").GetContent.String
ActiveDocument.Fields("Month").Select maxMonth
End Sub


That needs to be linked to the OnOpen of your document or OnActivate of the sheet if that is your intended functionality.

johnw
Champion III
Champion III

Or avoid the variable:

activedocument.fields("Month").select activedocument.evaluate("=max(Month)")

Or do it with actions if you're in version 9, since it's best to avoid macros where possible, and it's simpler anyway:

Select in Field
Field: Month
Search String: =max(Month)

Not applicable
Author

Thanks John ,

its done.