Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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

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

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