Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to show last month data with current month selection ??

Hi

I used few expressions it does'nt  work for me

1) Sum({<TYPE={'Conversion'},MACHINE={'N3 M / C - I'},  RM_Num_Select_Month_Year={$(max(Num_Select_Month_Year)-1)} >}DISTINCT FGOUTPUTQTY)

Sum({<RM_Num_Select_Date={'>=$(=MonthStart(Max(Num_Select_Date), -1))<=$(=MonthEnd(Max(Num_Select_Date), -1))'},TYPE={'Conversion'}

,MACHINE={'N3 M / C - I'}>}DISTINCT FGOUTPUTQTY)

its show hole year data, is ther any possible expression to show last month data with current month selection ????

1 Reply
kamalqlik
Partner - Specialist
Partner - Specialist

Try to use add month in this case

sum({$<Year = {$(=only(Year) - $(=if(only(Month) = 1, 1, 0)))}, Month = {$(=month(addmonths(MonthYear, -1)))}>} DISTINCT FGOUTPUTQTY)

.Use all the other fields same as you are using.

Regards

Kamal Naithani