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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

set analysis returns zero

I hope someone can help me find out what is wrong with this set expression.  The result is always zero no matter what i try to do to it.

=Count({$<CalendarMonthYear ={"$(= '<=' Date(MonthStart(Max(CalendarMonthYear),-1)), 'MMM-YYYY')"},Object_A={"<=30"}>} Distinct  Jobs)

1 Solution

Accepted Solutions
Anil_Babu_Samineni

This should like

=Count({$<CalendarMonthYear ={"<=$(=Date(MonthStart(Max(CalendarMonthYear),-1)), 'MMM-YYYY')"},Object_A={"<=30"}>} Distinct  Jobs)

OR


=Count({$<CalendarMonthYear ={"$('<=' & =Date(MonthStart(Max(CalendarMonthYear),-1)), 'MMM-YYYY')"},Object_A={"<=30"}>} Distinct  Jobs)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

2 Replies
Anil_Babu_Samineni

This should like

=Count({$<CalendarMonthYear ={"<=$(=Date(MonthStart(Max(CalendarMonthYear),-1)), 'MMM-YYYY')"},Object_A={"<=30"}>} Distinct  Jobs)

OR


=Count({$<CalendarMonthYear ={"$('<=' & =Date(MonthStart(Max(CalendarMonthYear),-1)), 'MMM-YYYY')"},Object_A={"<=30"}>} Distinct  Jobs)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

For your expression you are missing a $... and you also had a misplaced parenthesis

=Count({$<CalendarMonthYear = {"$(='<=' & Date(MonthStart(Max(CalendarMonthYear),-1), 'MMM-YYYY'))"}, Object_A ={"<=30"}>} DISTINCT Jobs)