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: 
vikas_nandanwar
Creator II
Creator II

Adding Column Measure

Hi,

I have auto date month and Week as two separate columns

I require a new column measure to be added to the data calculated as =

Date Month + week

Example

Date= 2 jan

Week = 1

My new column name should be = Month+Week

Answer  = Jan1

Thanks,

Vikas

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Do you mean this?

LIB CONNECT TO '198.7.112';

Join

LOAD GroupNm,

    CategoryNm,

    SubCategoryNm,

    SizeNm as Size,

    QualityNm as Quality,

    OGC,

    Ptype,

    InventoryQty as Qty,

    StockValueInDollar as CostAmount,

    WkClosingdate & DateWeek as TransactionDate;

SQL SELECT GroupNm,

    CategoryNm,

    SubCategoryNm,

    SizeNm,

    QualityNm,

    OGC,

    Ptype,

    InventoryQty,

    StockValueInDollar,

    MemoOut,

    MemoIn,

    WkClosingdate,

    DataWeek

  

FROM dbCertifiedInventory.dbo."vw_DailyInventoryUpload834";

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

View solution in original post

3 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Simply use preceding load in script like below.

Load *,Month&Week  as Newfield;

Load Date,Month,Week from xyz;

In front end (on visualization) you can add dimension as

Month&Week

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
vikas_nandanwar
Creator II
Creator II
Author

The below is my script

LIB CONNECT TO '198.7.112';

Join

LOAD GroupNm,

    CategoryNm,

    SubCategoryNm,

    SizeNm as Size,

    QualityNm as Quality,

    OGC,

    Ptype,

    InventoryQty as Qty,

    StockValueInDollar as CostAmount,

    WkClosingdate as TransactionDate,

    DataWeek;

   

SQL SELECT GroupNm,

    CategoryNm,

    SubCategoryNm,

    SizeNm,

    QualityNm,

    OGC,

    Ptype,

    InventoryQty,

    StockValueInDollar,

    MemoOut,

    MemoIn,

    WkClosingdate,

    DataWeek

  

FROM dbCertifiedInventory.dbo."vw_DailyInventoryUpload834";

I need to concatenate  -

WkClosingdate as TransactionDate,

   and DataWeek;

Anil_Babu_Samineni

Do you mean this?

LIB CONNECT TO '198.7.112';

Join

LOAD GroupNm,

    CategoryNm,

    SubCategoryNm,

    SizeNm as Size,

    QualityNm as Quality,

    OGC,

    Ptype,

    InventoryQty as Qty,

    StockValueInDollar as CostAmount,

    WkClosingdate & DateWeek as TransactionDate;

SQL SELECT GroupNm,

    CategoryNm,

    SubCategoryNm,

    SizeNm,

    QualityNm,

    OGC,

    Ptype,

    InventoryQty,

    StockValueInDollar,

    MemoOut,

    MemoIn,

    WkClosingdate,

    DataWeek

  

FROM dbCertifiedInventory.dbo."vw_DailyInventoryUpload834";

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