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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Jsobrinho77
Creator
Creator

default max month selection in filter pane when app opens

hi guys

I have two filters, year and month (it's a dual ( M01, M02, M03, M04.....)

How can I do the bookmark with max year and max Month pre-selected?

if the max year is 2023 I need to show M04

for a year I have the expression in the filter pane: 

=YEAR=MAX({1} Total YEAR) its works.

months don't return the max month M04

=MAX({1} Total Month) 

When I press enter its selected four months M01,M02, M03 and M04, but I need just select  the max Month M04

 

Labels (4)
3 Replies
sandeep-singh
Creator II
Creator II

Try this

{<YEAR={"=YEAR=Max({1}Total YEAR)"},MONTH={"=MONTH = Max(Total MONTH)"}>}

Digvijay_Singh

Create Month Year field in your data model like this - 

dual(date(monthend([Date Field]),'MMM-YY'),monthend([Date Field])) as [Month Year],

Then create bookmark like this - 

{<[Month Year]={"=[Month Year]=Max({1} total [Month Year])"}>}

Digvijay_Singh_0-1681499464224.png

 

Jsobrinho77
Creator
Creator
Author

First of all, thank you for your answers,

I think that the problem is, I have two separate fields, I have Year and Month separated, so I can't use this formula MonthYear.

So I'm trying to do something, but still error

when I inserted this into Month filter
{<YEAR={"=YEAR=Max({1}Total YEAR)"},MONTH={"=MONTH = Max(Total MONTH)"}>} 

I have the correct Month if I selected max(year) = 2023, but if I refresh the page, the next selection, shows Month = December, because is the max Month, and unselect/ignore MAX(YEAR) = 2023 and the max Month that is APR