Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to create a second column from a dimension value.


Hi, I was hoping someone here would be able to help me.


I have the below data and would like the dimension data as value in one column (as the results pic), instead of 3 records.

So the first Channel in 'Channel 1', the second Channel in 'Channel 2' - this is in order by 'TV_Date'

I managed to display the first value by the below code, but need help on the following columns...

=FirstSortedValue({<TV_Date={'=aggr(min(TV_Date), FTVID)'}>}Sender, TV_Date)

Any help appreciated!

Best,

Betul

Data

data.JPG

Results

results.JPG

1 Solution

Accepted Solutions
sunny_talwar

May be this in straight table

Dimension: FTVID

Expressions

Channel 1

=FirstSortedValue(Channel, TV_Date)

Channel 2

=FirstSortedValue(Channel, ((TV_Date)* 100000 + Ord(Left(Channel, 1))), 2)

Channel 3

=FirstSortedValue(Channel, ((TV_Date)* 100000 + Ord(Left(Channel, 1))), 3)

Capture.PNG

View solution in original post

5 Replies
sunny_talwar

May be try this:

What would Channel 2 = ? since both 13th Str and History have exactly the same TV_Date?

Anonymous
Not applicable
Author

Hi Sunny, Can go by alphabetical order if the TV_Date is exactly the same.

sunny_talwar

May be this in straight table

Dimension: FTVID

Expressions

Channel 1

=FirstSortedValue(Channel, TV_Date)

Channel 2

=FirstSortedValue(Channel, ((TV_Date)* 100000 + Ord(Left(Channel, 1))), 2)

Channel 3

=FirstSortedValue(Channel, ((TV_Date)* 100000 + Ord(Left(Channel, 1))), 3)

Capture.PNG

Anonymous
Not applicable
Author

Hi Sunny,

That works great! Thank you so much for your help.

Betul

sunny_talwar

Not a problem