Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
I have small issue:
I need to reduce the size of the label into two lines
means length of the label values.
Example: in my image i hve label name pharmacy h/w replacement it is in single line.
REQ: i need that in two lines: like: pharmacy h/w
replacement
Please refer the image .
Thanks in advance.
Suresh
May be try with Calculated Dimension. Like
=if(FindOneOf(Dim,' ',1)<10,Left(Dim,FindOneOf(Dim,' ',2))&chr(10)&Mid(Dim,FindOneOf(Dim,' ',2),Len(Dim)) ,
if(FindOneOf(Dim,' ',2)>=10,Left(Dim,FindOneOf(Dim,' ',1))&chr(10)&Mid(Dim,FindOneOf(Dim,' ',1),Len(Dim)),Dim))
Is it just this one label, or do you require a rule to split labels?
If it is just the one, you can do this in the load script:
LOAD
MyField,
Replace(MyField, 'pharmacy h/w replacement', 'pharmacy h/w' & chr(10) & 'replacement') as MyDimension,
This will give you two fields, with and without the line break, so you can use different in different places - you could just rename the field if you only need it once.
If it needs to be more general you could replace all spaces:
Replace(MyField, ' ', chr(10)) as MyDimension,
But it looks like that could get messy for you.
Working out to only replace a space with a line break if it is in the middle of a long dimension could get quite tricky to achieve.
Hope that helps.
Steve
I recommend changing the chart orientation on the Style tab so the bars are displayed horizontally. You can resize the chart so the labels show correctly. And you can insert line breaks like Steve explained.
Good call gwassenaar - I set about answering the question, rather than engaging brain about whether there was a better way of showing the data.
Hi ,
By Horizontal orientation and Control shift you can make your right view,
HTH,
Hirish
thnx alot fr ur reply dark.
I need for dimension level. not for single field.
thnx gysbert.
i need in vertically only....
i tried dat one bro...but i need verical only.... that label names shud be in two lines.
In that case, you could do the thing of replacing all spaces or underscores with new line characters:
Replace(Replace(MyField, '_', ' '), ' ', chr(10)) as MyDimension,
This will result in many lines for some dimensions though. Another approach is to create an ApplyMap table of original and replaced dimension names in Excel. Here you can list all of the original names (which you can copy and paste from a LisBox) and then type into the next cell a new name, that can include line feeds.
You would then have the syntax:
Map_2LineDim:
LOAD
Orig,
New
FROM [.\RenameDims.xls]
(biff, embedded labels, header is 1 lines, table is [Rename$]);
LOAD
MyField,
ApplyMap('Map_2LineDim', MyField) as MyDimension,
...
This way you can control exactly what you have for each dimension. Also, given that ApplyMap defaults to the original value when no lookup match is found, any values which you don't put in the lookup will appear as they did before.
This post gives a lot more information on ApplyMap:
http://www.quickintelligence.co.uk/applymap-is-it-so-wrong/
Steve
May be try with Calculated Dimension. Like
=if(FindOneOf(Dim,' ',1)<10,Left(Dim,FindOneOf(Dim,' ',2))&chr(10)&Mid(Dim,FindOneOf(Dim,' ',2),Len(Dim)) ,
if(FindOneOf(Dim,' ',2)>=10,Left(Dim,FindOneOf(Dim,' ',1))&chr(10)&Mid(Dim,FindOneOf(Dim,' ',1),Len(Dim)),Dim))