9 Replies Latest reply: Sep 13, 2016 8:12 AM by Andrew Walker

# Load dimension in particular order

Hi All,

I have a dimension called channel and in that i have fields like a,b,c,d,e.. Now i want to load in particular order like.

e,b,c,a,d..

Can you please tell me how can i achieve it.

Thanks,

Bharat

• ###### Re: Load dimension in particular order

Hi,

When you say load, do you mean while showing on frontend it should be shown in defined order?

if yes then you can use the Expression option under sorting tab.

The expression will be like this.

If(Value = 'e',1,

If(Value = 'b',2,

If(Value = 'c,3,

If(Value = 'a',4,

If(Value = 'd',5,....

Regards,

Kaushik Solanki

• ###### Re: Load dimension in particular order

Thanks a lot...Slight confusion..

• ###### Re: Load dimension in particular order

Yes Please tell me whats the confusion.

• ###### Re: Load dimension in particular order

No.. i m saying that i am bit confused because  i have done this but i forget...

• ###### Re: Load dimension in particular order

Okies.

Cheers..

Regards,

Kaushik Solanki

• ###### Re: Load dimension in particular order

Hi Bharat,

Try something like:

Temp:

Channel,

.

.

;

Data:

.

.

Drop Table Temp;

Cheers

Andrew

• ###### Re: Load dimension in particular order

Thanks a lot Andrew..

• ###### Re: Load dimension in particular order

Thanks Andrew,

What if when there is 120 values in single field and required to load in the proper order.

Regards,

Anand

• ###### Re: Load dimension in particular order

Hi Anand,

If the load order was defined in a separate table of 120 values in the order we want we can load this first table with an autonumber field. The fact table can then be loaded as a temp table with an autonumber field on this dimension and then the facts can be loaded from this temp resident table ordered by that autonumber field.

Cheers

Andrew