Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

morning guys

can any one help:

is there anything wrong with the following expression:

      • Sum({$<MonthID = {“<=$(=Max(MonthID))”}, Year = {$(=Max(Year))}, Quarter = , Month = >} Sales)

10 Replies
senpradip007
Specialist III
Specialist III

What is your requirement and what outcome you are getting from this?

Not applicable
Author

Hi Sen,

my requirements is to get Year_To_Date(YTD):

I think there is something wrong with the expression as it populate dashes on the filed.

petter
Partner - Champion III
Partner - Champion III

MonthID and Month might be in conflict with each other. The last criteria Month might cancel out the earlier MonthID selection.

arulsettu
Master III
Master III

Not applicable
Author

Hi Settu,

I have the YTD,QTD,MTD and WTD but I want the previous period:

LYTD, LQTD, LMTD, PRIOR_YEAR_MTD, LWTD and PRIORYEAR_WTD

arulsettu
Master III
Master III

arsal_90
Creator III
Creator III

YTD Previous:

num(SUM({<Year={'$(vPriorYear)'},Month=,Day=,Num={'<=$(vPriorYearDate)'},MonthYear=,Quarter=,Flag={'Actual'}>}[Net Sales]),'##,##0')

vPriorYear=(vMaxYear) -1

vPriorYearDate=num(date(addyears(max(Num), -1), 'DD MMM YYYY'))

Not applicable
Author

Hi Settu,

I m going to have to update the numbers manually?

sunilkumarqv
Specialist II
Specialist II

if u have MonthOrderID then use like

  • Currernt YTD:
  • Sum({$<   MonthOrderID{"$(=Max({<Year={$(=Max(Year))}>}MonthOrderID))"}>} Sales)

  • Previous YTD:
  • Sum({$<   MonthOrderID{"$(=Max({<Year={$(=Max(Year)-1)}>}MonthOrderID))"}, Quarter = , Month = ,Year=>} Sales)