Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
stephenedberkg
Creator II
Creator II

MTD into YTD

how to write below MTD expression in YTD?

=Sum({<Year={$(=Max(Year))},MonthID= {"<=$(=Max(MonthID))"},Month=,Year=>} Aggr(If(Only({1}MonthIDS) = Max(TOTAL <SKU> MonthID ) + Only(TOTAL <SKU> OrderLockPeriod)  ,

Sum({<Year={$(=Max(Year))},MonthID= {"<=$(=Max(MonthID))"},Month=,Year=>}Arrivals)), SKU, MonthIDS ))

6 Replies
sunny_talwar

Stefan where is a sample my friend? Without a sample you are just hoping someone will be able to help, please provide one with the desired solution so that we can help you in best possible way

stephenedberkg
Creator II
Creator II
Author

Dear  sunindia

i attached the sample app.

i am using Personal edition so i can't access it. .

i changed the expression for my Requirement

=Sum({<Year={$(=Max(Year))},MonthID= {"<=$(=Max(MonthID))"},Month=,Year=>} Aggr(If(Only({1}MonthIDS) = Max(TOTAL <SKU> MonthID ) + Only(TOTAL <SKU> OrderLockPeriod)  ,

Sum({<Year={$(=Max(Year))},MonthID= {"<=$(=Max(MonthID))"},Month=,Year=>}Arrivals)), SKU, MonthIDS ))

Anonymous
Not applicable

may be like this?

=Sum({<Year={$(=Max(Year))},MonthID= {">=$(=Min(MonthID))"},Month=,Year=>} Aggr(If(Only({1}MonthIDS) = min(TOTAL <SKU> MonthID ) + Only(TOTAL <SKU> OrderLockPeriod)  ,

Sum({<Year={$(=Max(Year))},MonthID= {">=$(=Min(MonthID))"},Month=,Year=>}Arrivals)), SKU, MonthIDS ))

sunny_talwar

I don't see any attachment?

stephenedberkg
Creator II
Creator II
Author

Dear  Sunny T

i attached the sample help me?

stephenedberkg
Creator II
Creator II
Author

Dear balrajahlawat

this expression also show the MTD Values only