Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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.

6 Replies
settu_periasamy
Master III
Master III

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)

amit_saini
Master III
Master III

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

jagan
Luminary Alumni
Luminary Alumni

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.

ishanbhatt
Creator II
Creator II

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

agni_gold
Specialist III
Specialist III

hope this helps you.

ahmar811
Creator III
Creator III

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