Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Not applicable

Dimension name change

Hi,

i want to change the dimension name in the chart but in source table the names are in month format.

like

Source table--------Required Names  in chart

Jan-----First Month

Feb-----Second Month

Mar-----third Month

April-----Fourth Month.

Tags (1)
6 Replies
Highlighted

Re: Dimension name change

Hi,

You can try to load one more Inline table with All the Month and number, Then you can use it in your dimension like

LOAD * INLINE [

    Month, Sales

    Jan, 100

    Feb, 200

    Mar, 300

    Apr, 400

    Jun, 500

];

Month_Map:

LOAD * INLINE [

    Month, MonthNum

    Jan, 1

    Feb, 2

    Mar, 3

    Apr, 4

    May, 5

    Jun, 6

    Jul, 7

    Aug, 8

    Sep, 9

    Oct, 10

    Nov, 11

    Dec, 12

];

Your Dimension should be :

='Month : '&MonthNum


Edit:

Or if your Month field is dual, then just use num function in your Dimension. Like

='Month : '& num(Month)

Highlighted
Honored Contributor III

Re: Dimension name change

Hi ,

You can do this by two concepts:

1. Inline :

LOAD * INLINE [

Month ,Month_New

Jan    ,First Month

Feb    ,Second Month

Mar    ,third Month

Apr,Fourth Month

];

2. Wildmatch :

if(WildMatch(Month,'*Jan*','*Feb*,*Mar*,*Apr*'),'First Month','Second Month','third Month','Fourth Month') as Month_New


Thanks,

AS

Highlighted
MVP & Luminary
MVP & Luminary

Re: Dimension name change

Hi,

Try like this

Data:

LOAD * INLINE [

    Month, Sales

    jan, 100

    feb, 200

    mar, 300

    apr, 400

    june, 500

];

MonthMapping:

LOAD *

INLINE [

Month, Month_Display

    jan, Month1

    feb, Month2

    mar, Month3

    apr, Month4

    june, Month5];

Now in your chart use Month_Display dimension as a dimension.

Hope this helps you.

Regards,

Jagan.

Highlighted
Contributor II

Re: Dimension name change

Hi,

Please Use this technique.

Month_Mapping:

LOAD * INLINE [

    Month, MonthNumber

    jan, Month1

    feb, Month2

    mar, Month3

    apr, Month4

    june, Month5

];

Use  MonthNumber in Dimension instead of Month.

If Monthnumber is not sorted any reason then go to sort tab and select Load Order.

Name.PNG

Regards,

Ishan Bhatt

Highlighted
Valued Contributor III

Re: Dimension name change

hope this helps you.

Highlighted
Contributor III

Re: Dimension name change

try this logic on Dimension

=if(wildmatch(Month,'*jan*'),'Month1'

,if(wildmatch(Month,'*feb*'),'Month2'

,if(wildmatch(Month,'*mar*'),'Month3'

,if(wildmatch(Month,'*apr*'),'Month4'

,if(wildmatch(Month,'*may*'),'Month5'

,if(wildmatch(Month,'*jun*'),'Month6'))))))

and also implemented in qvw file