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

Based on Variable selection it will display the Max Month , Year

Hi All,

I have year and month fields,

I have reports, I have created one variable Month_Year =1,  I have created one Input Variable, In that I passed 1 for year, 2 for Month .In that If I select the input box as year it will display the Max year information, If I select the month in Input box it will display the Max Month data like sept 2021. 

Thank you.

Regards,

Ram 

4 Replies
abhijitnalekar
Specialist II
Specialist II

Hi,

 

Do we have a date field in the data ? 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
Ramu_i
Creator II
Creator II
Author

Hi Abhijitnalekar,

I have Year field and Month Field ,Year field having 2021,2020, 2019 ...like that, Month Field 01,02,03 ...like that 

we have two filters month and year, at the same time I selected the year 2021 , in months filter it will display the 01, to 09 , If i select the 2020 in month filter shows 01, to 12 .

 

Thank You .

abhijitnalekar
Specialist II
Specialist II

Hi,

Please try bleow code

if($(variable)=1,max(year),

if($(variable)=2,max(Month)

)

)

Hope this give you the required result.

 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
Ramu_i
Creator II
Creator II
Author

Hi Abhijithalekar,

Thank you