Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Straight Table Expression Sum as Variable

Hi Folks,

I cretaed the Straight Table. I need to use the expression sum in the Straight table as variable. How can I do that?

Can I use the expression in the Startight Table as the column out side of the table chart?

VAriable.JPG

Thanks & Regards,

Siri

8 Replies
danielact
Partner - Creator III
Partner - Creator III

You can't create expressions in a table box. Use a straight table instead.

Not applicable
Author

Hi thanks for your reply. Sorry I am asking wrongly.

My question regarding Straight table only.

oscar_ortiz
Partner - Specialist
Partner - Specialist

You can create a variable in your document and use that as part of the expression:  For example create a variable vExpression with the definition of =Sum(Sales) then use the $(vExpression) in your chart's expression.Good luck

Not applicable
Author

Hi Ortiz, Thanks for your reply.

I need the use the total sum of the expression in the straight table as variable. Please find the below Image.

Please help me in this.

VAriable.JPG

Thanks & Regards,

Siri

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Define a variable (lets call it vTotalRAM):

In your script:

Set vTotalRAM = Sum(Aggr(Sum(RAM), QVWName));

After reloading you can use the expression $(vTotalRam) to get the value which should be the same as the table total.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi Jonathan, Thanks for Your Reply.

The RAM is not a column. In the above straight table, QVW NAME, Document Size and Concurrent Users are the columns. Others Expression Values.

RAM Initial = [SIZE(KB)]*vFileSizeMultiplier

RAM USER=([SIZE(KB)]*vFileSizeMultiplier*vUserRAMratio)/100

RAM=([RAM USER]*[Concurrent Users])+[RAM Initial]

So I need to use the total sum value as vaeiable and RAM as the List box.

Please provide your suggestions.

Thanks & Regards,

Siri

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Then use this instead:

Sum(Aggr(Sum(([RAM USER] * [Concurrent Users]) + [RAM Initial]), QVWName))

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

This helped me a lot. Thank you very much.