Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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

You are very expert , you can trouble shoot script with out need to reload , how many year you have been doing qlik view ?

Anil_Babu_Samineni

But, It kills the performance if we forcibly to write calculated conditions. So, I don't use normally instead i would love to create field in script and use that field in the section of "User dimensions"

I have been used Qlik only for official time. My core business is different not any BI platform.

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

Correct , But some time hard to maintemance. Like below :-

durationMap12:

MAPPING LOAD

rowNo() as key,

(((recno()-1)12)+1) & '-' & (((recno()-1)12)+12) & ' Mth' as label // org (12 for 1-12 mth) (3 for 1 to 3 mth)

AUTOGENERATE 5 //org (5 for 1-12 mth) ( 20 for 1-3 mth)

WHILE iterNo() <= 12 // org (12 for 1-2 mth) (3 for 1-3 mth)

;

LOAD *,

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(L_issue = '00/00/0000' AND L_move = '00/00/0000', 'Not Order Yet'

,applyMap('durationMap12', , '>60 Mth')

))) as Duration12

;

Anil_Babu_Samineni

I don't think anything difficult in script to maintain field

When it is set up with different which are auto generate script used then you could call then using into 2 tables like

durationMap12:

MAPPING LOAD

rowNo() as key,

(((recno()-1)12)+1)  & '-' & (((recno()-1)12)+12) & ' Mth' as label    // org (12 for 1-12 mth) (3 for 1 to 3 mth)

AUTOGENERATE 5  //org (5 for 1-12 mth) ( 20 for 1-3 mth)

WHILE iterNo() <= 12   // org (12 for 1-2 mth) (3 for 1-3 mth)

durationMap12_copy:

NoConcatenate

Mapping Load key, label Resident durationMap12;

Drop Table durationMap12;

And then, You can now use Mapping prefix to call them into next table like

Load *, ApplyMap('durationMap12_copy', fieldname, 'NA') as fieldname Resident durationMap12_copy;

Does it make sense to you ??

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

Wow you are so talent on scripting. So far I think your skill can match sunny . why you ranking now in top 10 ?

Anil_Babu_Samineni

No, Sunny is the most celebrity to each from community. But, Few folks are not yet visible.. So, Within the company every one celebrity like employee

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