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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
sarfaraz_sheikh
Contributor III
Contributor III

Stuck in set Analysis

Dear All,

I am using below expression in my formats...but i am not getting any results by using the same expression.

count(DISTINCT {< month_year={">$(=vStart_Month)"}>} D_SI_NO

When i remove the greater_than sign (>) from expression then it is work ...once i attribute (>) symbol with expression its not working.

month_year is field contains value like ....Apr 2015, May 2015 ,,,Jun 2015 etc. and i  want to calculate for specific periods.

vStart_Month == is variable contans this...... MonthName(YearStart(Today()-1,0,4)) ............expression

I dont know where i am doing wrong ...can anybody suggest me what should i have to do .

Sarfaraz

11 Replies
rubenmarin

Hi, just create another field in your calendar with year-Month as number, or as a date, ie:

Year(Date) & Num(Month(Date), '00') as YearMonthNum,

Then you can use:

count(DISTINCT {<YearMonthNum={">$(vStart_YearMonth)"}, Month>} D_SI_NO

vStart_YearMonth: =Min(YearMonthNum)

Also can be done loading Year-Month as date:

MonthStart(Date) as YearMonthDate // This will allow you to use date functions like AddMonths()

sarfaraz_sheikh
Contributor III
Contributor III
Author

Thnaks Ruben ...your solution is  working as expected ....Tnaks a lot

Sarfaraz