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

Announcements
Discover the Trends Shaping AI in 2026: Register Here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Nagaraju_KCS
Specialist III
Specialist III

Previous month

Hi All,

I have jan, feb, mar.......... Dec

If i am click March i want to show Feb Month data..(i want show Preious month) in script level...

Thanks...

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try this code.

     Load Month(Date) as Current_Month,

               Month(Addmonths(Date,-1)) as  Previous _Month

     From xyz.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

3 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try this code.

     Load Month(Date) as Current_Month,

               Month(Addmonths(Date,-1)) as  Previous _Month

     From xyz.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
its_anandrjs
Champion III
Champion III

Hi,

Another way is use variable like  vPrevMonth = Month(Addmonths(DateField,-1))

Thanks

Nagaraju_KCS
Specialist III
Specialist III
Author

ThankU for Response............