Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
dunnalahk123
Creator III
Creator III

default current month to filter selections

HI,

 

i have created one variable as max(Month)  . so it works fine . it gives me latest month by default and if some one select month filter also it works fine . but if some one select quarter it always take last month of quarter.

 

example: in quarter i have , 202105, 202106, 202107 ---- for FY21Q3 it takes only 202107.

 

count({$<[CompletedFlag]={1},Month=($(vMaxMonth))  }>} DISTINCT [Project ID])

 

how can i give . basically it should take always max month by default and if some one select any selection from filter it should work as per filter selection.

1 Solution

Accepted Solutions
brunobertels
Master
Master

try with GetCurrentSelections ()

if(GetCurrentSelections ()>0,mesure1, count({$<[CompletedFlag]={1},Month=($(vMaxMonth))  }>} DISTINCT [Project ID])) 

View solution in original post

4 Replies
Or
MVP
MVP

It sounds like that's exactly what it's doing? Someone selected a quarter, so it's giving you the max(month) for that quarter.

If you want it to ignore all filters except month, you should probably set your variable to something along the lines of

=if(GetSelectedCount(Month)>0,max(Month),Max({1} Month))

dunnalahk123
Creator III
Creator III
Author

Hi,

 

Thank you for your reply.

 

requirement is i have one text box in that always it should show latest month volume. example by default i should see aug month volumes. but if some on go to month filter and select any month it should give that respective month results.  and if some one select any quarter it should give that quarter results. quarter means it 3 months.

brunobertels
Master
Master

try with GetCurrentSelections ()

if(GetCurrentSelections ()>0,mesure1, count({$<[CompletedFlag]={1},Month=($(vMaxMonth))  }>} DISTINCT [Project ID])) 

dunnalahk123
Creator III
Creator III
Author

Thank you , it works .