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

Custom text alignment in text box/expressions?

Hi all,

I have a text box in one of my dashboards and I want to have a custom alignment for certain parts of the expression (ie. label is left aligned and data point in right aligned). Here's an example of the expression in my text box.

= variable & ' string: ' & expression

& chr(10)

& variable & ' string: ' & expression

& chr(10)

& variable & ' string: ' & expression

Basically I want the expression to be formatted as follows:

= LeftAlign( variable & ' string: ') & RightAlign(expression)

& chr(10)

& LeftAlign(variable & ' string: ') & RightAlign(expression)

& chr(10)

& LeftAlign(variable & ' string: ') & RightAlign(expression)

Is there an expression or character that allows me to do this in qlikview?

4 Replies
Not applicable
Author

Hello, the easiest way is to use 2 text boxes. Set LEFT align in one and RIGHT align in 2nd. In the first one your expression will be:

string:

string:

string:

and in the 2nd one:

expression

expression

expression

pokassov
Specialist
Specialist

Hi!

I have no idea.

But you can use 2 different text boxes.

One of them you can use for text variable with left align and the second one for expression

Using different layers for them may be useful.

Not applicable
Author

I thought of that idea right after I posted but was wondering if there was a more elegant example to keep everything together in one text box.

Anonymous
Not applicable
Author

You can try to use the fixed length, that is calculate the length of strings and expression results, and fill the space between with the calculated amount of spaces.

But, I'd rather use what Сергей Покасов suggests.