Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Text Object - adding text and calculations in the same box

Hi, I'm trying to see if anyone has an example of adding a combination of Text and a Calculation in a Text object.

I want to recreate the following:

Calc Text Box.png

So, the calculated elements are:

437h is a calculation from total of hours represented in the chart

28% is the percentage it represents

1,578 pulled from a table and calculated

2,320 pulled from a table and calculated

58 pulled from a table

These are spread within the standard lines of text.

Hope someone likes a challenge!

Any help would be appreciated.

Thanks

Rob

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Not applicable

Re: Text Object - adding text and calculations in the same box

You can create variables and use them in a textbox. With var1 having a value of 437 and var2 a value of 28 the line

=var1 & 'h or '  & var2 & '%'

will show the text  437h or 28%

What you can't do is use different font sizes in one textbox. But you can use several textboxes one above the other so the line up nicely. You can put you calculations in variables. You can use chr(10) to insert line breaks.

=var1 & 'h or ' & chr(10) & var2 & '%'

will show:

437h or

28%


talk is cheap, supply exceeds demand
2 Replies
Gysbert_Wassenaar
Not applicable

Re: Text Object - adding text and calculations in the same box

You can create variables and use them in a textbox. With var1 having a value of 437 and var2 a value of 28 the line

=var1 & 'h or '  & var2 & '%'

will show the text  437h or 28%

What you can't do is use different font sizes in one textbox. But you can use several textboxes one above the other so the line up nicely. You can put you calculations in variables. You can use chr(10) to insert line breaks.

=var1 & 'h or ' & chr(10) & var2 & '%'

will show:

437h or

28%


talk is cheap, supply exceeds demand
Not applicable

Re: Text Object - adding text and calculations in the same box

Thank you for the very prompt answer - this is a really good community.

Cheers Rob