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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
stephenedberkg
Creator III
Creator III

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 ))

Labels (1)
6 Replies
sunny_talwar
MVP
MVP

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 III
Creator III
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
MVP
MVP

I don't see any attachment?

stephenedberkg
Creator III
Creator III
Author

Dear  Sunny T

i attached the sample help me?

stephenedberkg
Creator III
Creator III
Author

Dear balrajahlawat

this expression also show the MTD Values only