Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator III

Re: Invalid expression ?

date is a dual field in Qlik, if you want to convert number to actual date,

put it under Date() function,

 

you can put date on top of peek in the variable itself

Highlighted
Creator III
Creator III

Re: Invalid expression ?

Hi Asinha,

I did the changes accordingly but still when I am using the condition-

and TransMonth=Month(addmonths('$(MAX_STATEMENT_DATE)',-1) in the flag if statement. I am getting null.

Please kindly assist. sample model attached.

Highlighted
Creator III
Creator III

Re: Invalid expression ?

I cannot reload and see unless I have your data file

what is the value of this 

Month(addmonths('$(MAX_STATEMENT_DATE)',-1)?

 

can you try this again?

Month(addmonths($(MAX_STATEMENT_DATE),-1)

Highlighted
Creator III
Creator III

Re: Invalid expression ?

Hi,

Q.? Month(addmonths('$(MAX_STATEMENT_DATE)',-1)?

Ans: The value should be 'Aug' as we care currently sitting in 'Sep'

 

even though I change Month(addmonths($(MAX_STATEMENT_DATE),-1) from Month(addmonths('$(MAX_STATEMENT_DATE)',-1)

 

I think it is not picking the value of Month($(MAX_STATEMENT_DATE)

 

 

 

FlagFields:
LOAD
RECORD_GM_ID,
if("TransDay" >=1 and "TransDay" <=7 and TransMonth=Month($(MAX_STATEMENT_DATE)), '1-7Sep',
if("TransDay" >=8 and "TransDay" <=14 and TransMonth=Month($(MAX_STATEMENT_DATE)), '8-14Sep',
if("TransDay" >=15 and "TransDay" <=21 and TransMonth=Month($(MAX_STATEMENT_DATE)), '15-21Sep',
if("TransDay" >=22 and "TransDay" <=28 and TransMonth=Month($(MAX_STATEMENT_DATE)), '22-28Sep')))) as FlagData
Resident
FINANCE;

Highlighted
Creator III
Creator III

Re: Invalid expression ?

it worked.

When I change SET to LET

Let MAX_STATEMENT_DATE=peek('MaxDate');

But my script is showing in black and warning sign-

clipboard_image_0.png

 

But the Flag worked and chart.