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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Issue in set expression

Hi,

Can someone tell me what's wrong with my set expression.

I want sum of USD for all transactions whose funding date is less than today + where expected funding date is null

({< [Transaction TFS Status Desc]  -= {'Funded','Lost','Rejected'},

       
[Expected Funding Date] = {"<=$(=DATE(today()-1,'MM/DD/YY'))"},

       
[Transaction Status Date Num]   = {'>=$(v12MonthsAgoStart)'}
  

>}USD)

+

sum({<
[Transaction TFS Status Desc]  -= {'Funded','Lost','Rejected'},

      
[Transaction Status Date Num]   = {'>=$(v12MonthsAgoStart)'}
    

       ,
[Expected Funding Flag] = {'N'}

>}USD)

Regards,
Sachin

2 Replies
petter
Partner - Champion III
Partner - Champion III

It is very hard to judge just by looking at your expression out of context. Is it possible for you to share a sample QVW-file that illustrates your problem?

ramoncova06
Partner - Specialist III
Partner - Specialist III

it is like Petter just mentioned is hard to tell what might be wrong since we cannot see what is inside the variables or the date format, the only obvious thing to me is to use rangesum instead of sum(1)+sum(2) because  if one of the results of your expressions is null your expression will fail, and by using rangesum the null be considered as a 0

rangesum(

sum(

({< [Transaction TFS Status Desc]  -= {'Funded','Lost','Rejected'},

       
[Expected Funding Date] = {"<=$(=DATE(today()-1,'MM/DD/YY'))"},

       
[Transaction Status Date Num]   = {'>=$(v12MonthsAgoStart)'}
  

>}USD)

,

sum({<
[Transaction TFS Status Desc]  -= {'Funded','Lost','Rejected'},

      
[Transaction Status Date Num]   = {'>=$(v12MonthsAgoStart)'}
    

       ,
[Expected Funding Flag] = {'N'}

>}USD)

)