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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
ilanbaruch
Specialist
Specialist

YTD expression

hi all

in my model i have a kpi object with bellow expression :

Count({$<StatusFlag={'1'},YYYY = {$(#=max(YYYY)-1)},YearToDate={'YTD'} > } distinct order_id)

it is working well when changing values in year field, but when adding Quarter to selection it is retrieving 0 value

i dont want to add <Qurter=> to ignore quarter selection, is it possible to adapt the expression to retrieve the correct value ?

 

advanced thanks

3 Replies
sunny_talwar

Is your Quarter field includes both Quarter and Year or is it just Quarter? Meaning, do you store it like this Q1 or Q12019? If it stored with year, do you have another Quarter field which isn't stored with year?

ilanbaruch
Specialist
Specialist
Author

Hi Sunny,

i have both with and without year

YearQuarterNum- 20181,20182,20183

Quarter - Q1,Q2,Q3

sunny_talwar

And you are making selection in Quarter field and not YearQuarterNum field?