Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

How to replace L_move <= '01/01/2014' with Year_n<='5' ?

Hi All


Below expression work fine :-


=if([C_ONHAND_AMT]>1 and L_move <= '01/01/2014', [C_ONHAND_AMT])


I neee to replace 01/01/2014 to Year_n <= 5 , In Table 2 i using below expression :-


=if([C_ONHAND_AMT]>1 and Year_n <= 5, [C_ONHAND_AMT])

=if([C_ONHAND_AMT]>1 and Year_n <= '5', [C_ONHAND_AMT])

=if([C_ONHAND_AMT]>1 and Year_n <= "5", [C_ONHAND_AMT])


it does not work , Hope some one can advise me.


I expect to make table 1 and 2 same total amount.


Paul Yeo



9 Replies
paulyeo11
Master
Master
Author

My QVW

Anil_Babu_Samineni

May be use this measure and don't call Calc. Field instead use Direct field

Sum({<PRODUCT_CODE_INV = {"=(Sum(C_ONHAND_AMT)>1 and L_move <= '01/01/2014')"}>} C_ONHAND_AMT)

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
paulyeo11
Master
Master
Author

Hi Anil

I think i never explain to you why i want to using Year_n , so that i don't need maintenance.  it is possible to help me with the Year_n ?

Paul

Anil_Babu_Samineni

What u want help from here?

year(today()) - year(@180:190T) + 1                                   as Year_n,

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
paulyeo11
Master
Master
Author

Hi Anil

=if([C_ONHAND_AMT]>1 and Year_n <= 5, [C_ONHAND_AMT])

=if([C_ONHAND_AMT]>1 and Year_n <= '5', [C_ONHAND_AMT])

=if([C_ONHAND_AMT]>1 and Year_n <= "5", [C_ONHAND_AMT])


My question is how to make the above expression work ?


Paul

Anil_Babu_Samineni

What you showed is working one only. Instead 3 rd one 1st, 2nd should work? Aren't you?

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
paulyeo11
Master
Master
Author

Hi Anil

I just check , all 3 expression not working.

Paul

Anil_Babu_Samineni

What about this?

=if([C_ONHAND_AMT]>1 and Year_n <= 5, Sum([C_ONHAND_AMT]))

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
paulyeo11
Master
Master
Author

Hi Anil

Still not display any thing on the table.

if the expression work fine , in future i don't need to maintenance this expression, as it will display those stock items after purchase for more then 4 year , not yet selling.

Paul