Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

nareshthavidishetty
Contributor III

Expression error

Hi,

I have used the below expression but it is not working.

Logic:

if([Calendar Date]>= date('31-May-2018'),'DD-MMM-YYYY') and [Calendar Date]<=date(max([Calendar Date],'DD-MMM-YYYY'),num(Sum({$< [PA Age Days 365 Flag]= {'Y'},[Monthly Snapshot Flag]= {1},[%Confirmed PA Flag]={'Y'}>}[# PA Open]),'#,##0',null()))

Thanks..

Tags (1)
1 Solution

Accepted Solutions
ChennaiahNallani
Contributor III

Re: Expression error

try like this

if([Calendar Date]>= date('31-May-2018','DD-MMM-YYYY')

      and [Calendar Date]<=date(max([Calendar Date],'DD-MMM-YYYY')),

        num(Sum({$< [PA Age Days 365 Flag]= {'Y'},[Monthly Snapshot Flag]= 1,[%Confirmed PA Flag]={'Y'}>}[# PA Open]),'#,##0')

            ,null())

View solution in original post

4 Replies
MVP
MVP

Re: Expression error

One correction could be like:

if([Calendar Date]>= date#('31-May-2018','DD-MMM-YYYY') and ....


Note, date#() and a bracket correction..

prma7799
Honored Contributor III

Re: Expression error

try this

if([Calendar Date]>= date('31-May-2018','DD-MMM-YYYY') and [Calendar Date]<=date(max([Calendar Date]),'DD-MMM-YYYY'),

num(Sum({$< [PA Age Days 365 Flag]= {'Y'},[Monthly Snapshot Flag]= {1},[%Confirmed PA Flag]={'Y'}>}[# PA Open]),'#,##0',null()))

balabhaskarqlik
Honored Contributor

Re: Expression error

Try this:

if([Calendar Date]>= date#(('31-May-2018'),'DD-MMM-YYYY') and

   [Calendar Date]<= date#(max([Calendar Date]),'DD-MMM-YYYY'),

   num(Sum({$<[PA Age Days 365 Flag]= {'Y'},[Monthly Snapshot Flag]= {1},[%Confirmed PA Flag]={'Y'}>}

           [# PA Open]),'#,##0'),null())

Bracket misplaced in 3 places.

ChennaiahNallani
Contributor III

Re: Expression error

try like this

if([Calendar Date]>= date('31-May-2018','DD-MMM-YYYY')

      and [Calendar Date]<=date(max([Calendar Date],'DD-MMM-YYYY')),

        num(Sum({$< [PA Age Days 365 Flag]= {'Y'},[Monthly Snapshot Flag]= 1,[%Confirmed PA Flag]={'Y'}>}[# PA Open]),'#,##0')

            ,null())

View solution in original post