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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

How to make my display display 2 year instead of 12-24 month ?

Hi All


I have below script working fine :-


LOAD *,

applyMap('durationMap12', [No of Months_], '64 Mth and more') as Duration12_

;


Now it display in month, like 12-24 month , may i know how to make it display 2 year ?




Paul Yeo

45 Replies
paulyeo11
Master
Master
Author

Hi Anil

Now I manage to edit your expression to my need , it work fine now.

Paul

Anil_Babu_Samineni

Great !!!

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
paulyeo11
Master
Master
Author

Hi Anil

Now I remove those partial reload script, which is very complicated.

More easy to maintenance.

Thank you for your help.

Paul

Anil_Babu_Samineni

What you've done now? Can you share your feedback of assignment with expression perhaps?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
paulyeo11
Master
Master
Author

Hi Anil

I modify your expression to below :-

=

if(L_issue = '00/00/0000' AND L_move <> '00/00/0000', ('New Product'),

if(S1 > '0' AND S2 > '0' and S3 > '0', ('Fast Moving'),

If( >= 1 and <= 6, Dual('<6 Mth', 1),

If( >= 7 and <= 12, Dual('>6 Mth-1 Yr', 2),

If( >= 13 and <= 36, Dual('>2-3 Yr', 3),

If( >= 37 and <= 60, Dual('>3-4 Yr', 4),

If( >= 61 and <= 84, Dual('>4-5 Yr', 6),

If( >= 85 and <= 108, Dual('>5 Yr', 7), Dual('> 5 Yr',7)

))))))))

This is the chart I need :- ( notice that it can display 1-6 month also >2-3 year Due to dimension expression from you very flexible )

My final objective is the reduce the inventory for those > 5 year.

Paul Yeo

Anil_Babu_Samineni

Liked It !!

I would suggest to use Dual() for first 2 lines like mine..!

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
paulyeo11
Master
Master
Author

Hi Anil

First 2 row , if I add Dual , it will have syntax error.

So I never add Dual for first 2 row.

Paul

Anil_Babu_Samineni

due to issue with parenthesis and single quite in your case. May be use this?

if(L_issue = '00/00/0000' AND L_move <> '00/00/0000', Dual('New Product',1),

if(S1 > '0' AND S2 > '0' and S3 > '0', Dual('Fast Moving',2),

If( >= 1 and  <= 6, Dual('<6 Mth', 3),

If( >= 7 and  <= 12, Dual('>6 Mth-1 Yr', 4),

If( >= 13 and  <= 36, Dual('>2-3 Yr', 5),

If( >= 37 and  <= 60, Dual('>3-4 Yr', 6),

If( >= 61 and  <= 84, Dual('>4-5 Yr', 7),

If( >= 85 and  <= 108, Dual('>5 Yr', 8),  Dual('> 5 Yr',9)

))))))))


Note - Anyway, you got it worked !!! Glad you were able to do. Thanks ..!

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
paulyeo11
Master
Master
Author

Hi Anil

Table not display any value.

Paul

Anil_Babu_Samineni

Then your way is probably right because you are not creating bucket for first 2 and you assigned the values to ranges only..

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful