Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am working on a dash board and need to concatenate two columns, ie Month + Year. Can this be done within the application?
You can concatenate two fields using &:
LOAD Month & Year as MonthYear
FROM YourFile.xlsx;
Thanks for your response.
Do you enter the statement LOAD Month & Year as MonthYear after
LOAD YEAR_NO,
MONTH_NO,
CHARGE_TYPE_CD,
SERVICE_NM,
BILL_ITEM_RT,
BILL_ITEM_QT,
TOTAL_CHARGE_AM,
DIV_CBD_CD,
BILL_ITEM_DS,
BILL_ITEM_ADDL1_DS,
BILL_ITEM_ADDL2_DS,
BATCH_CPU_COST_AM,
ONLINE_CPU_COST_AM,
STORAGE_COST_AM,
SERVICES_COST_AM,
UNIT_OF_CHARGE_DS,
EROOM_NUM_DS,
COST_CENTER_CD
Month & Year as MonthYear
You treat it just like any other field, so it can be any order:
LOAD YEAR_NO,
MONTH_NO,
MONTH_NO & YEAR_NO as MonthYear
FROM YourFile.xlsx
or
LOAD MONTH_NO & YEAR_NO as MonthYear,
YEAR_NO,
MONTH_NO
FROM YourFile.xlsx
Hi,
to avoid sorting issues you could create dual values like this:
Dual(Month&Year,MakeDate(Year,Month)) as MonthYear
hope this helps
regards
Marco
Dear Juan,
Ampersand (&) Symbol called concatenate operator in QlikView.
Whenever, you would like to concatenate/combine two or more than two fields than just write down with Ampersand sign.
In Edit Script,
--
Example:
Field1 & Field2 as newField
Field1 & ' | ' & Field2 as newField2
In your Scenario,
Month & ' - ' & Year as [Month Year]
In Expression,
--
Example:
Month & ' - ' & Year
Please note, don't use AS keyword in expression on UI Level, we use AS for field rename.
Kind regards,
Ishfaque Ahmed