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: 
Not applicable

sql condition in expression(urgent plsssss...)

Hi experts,

I have used the following expression for counting the no. of invoices (MTD) in a pivot table

Expression = count({<CalendarDate=, CalendarMonthYear= {">=$(=date(MonthStart(Max(CalendarDate))))<=$(=date(Max(CalendarDate)))"}>} InvoiceNo)

I have to include the following sql condition in the above expression.

sql condition  = COUNT(DISTINCT CASE WHEN ORDTYPE='SL' THEN ISNULL(InvoiceNo,'') END)


How can i include this.

please help

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try:

count({<ORDTYPE={'SL',} CalendarDate=, CalendarMonthYear= {">=$(=date(MonthStart(Max(CalendarDate))))<=$(=date(Max(CalendarDate)))"}>} if(IsNull(InvoiceNo),'',InvoiceNo))


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try:

count({<ORDTYPE={'SL',} CalendarDate=, CalendarMonthYear= {">=$(=date(MonthStart(Max(CalendarDate))))<=$(=date(Max(CalendarDate)))"}>} if(IsNull(InvoiceNo),'',InvoiceNo))


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks a lot