Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
pooja821
Creator
Creator

Month YTD Issue

Hi All,

I have calculated YTD for month and stored in variable called $(Month_YTD) using below expression:

Concat(distinct {1<fiscal_year={"$(=$(year))"},

accounting_period={"$(='>=' & 1 & '<=' & $(v_accounting_period))"}>}Date,',')


Where $(year) is as concat(distinct {$<Date={"$(=$(prev_month4))"}>}fiscal_year,',')

and $(v_accounting_period) is as  concat(distinct {$<Date={"$(=$(prev_month4))"}>} accounting_period,',')


The value of this Month_YTD variable is coming out to be 30-Nov-2017,31-Dec-2017 which is correct.


But when i m using this variable $(Month_YTD) in the below expression i.e.

count({$<Date={"$(=$(Month_YTD))"}>} distinct emp_id) , i am not getting the answers.


Although when i m manually feeding the dates in place of this Variable i.e


count({$<Date={'30-Nov-2017','31-Dec-2017'}>} distinct emp_id)  ,then i m getting the answer .


Is there something wrong with this expression.

Kindly help on this.

2 Replies
niclaz79
Partner - Creator III
Partner - Creator III

Hi,

It looks like your dates work when they are used as strings, but not as values. In your example it works when you write the dates within quotation marks, but I'm guessing your variable doesn't containg quotation marks right?

I think you can check this and ensure that the variable adds the quotation marks around the dates and it might just work fine.

sunny_talwar