Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Display Straight Table Total value in another object

Do we have an option in QV 11 to display 'Straight Table Total value' from one object to display in another object like Straight Table or other charts?

Andrew

7 Replies
sunny_talwar

You should be able to use the Aggregate function to replicate the Total of your straight table in a text box

Sum(Aggr(YourExpression, yourDimensionsfromStraightTable))

If the above doesn't give you what you are looking for, would you be able to share a sample of what you are trying to achieve?

Best,

Sunny

cesaraccardi
Specialist
Specialist

Hi Andrew,

I am afraid there isn't such option, so you will have to recalculate the Total value in the other charts. Can you be more specific about how you want to use that total in the other objects?

Cesar

Not applicable
Author

Hi,

Thanks for your inputs.

However, I am aware of this Aggregate function, and can calculate and display the total accordingly. I am looking some easy way to display Straight Table total value in separate object. The reason is, my straight table is having  8 dimensions and 9 calculate expressions and I need to write the very long expressions again. Since, I just need to show the Total value, am looking some option or function (if Qlik has it) to call the value from the existed  object.

Andrew

Anonymous
Not applicable
Author

I am not aware of any way to do what you are after.

But it can often be useful to store expressions in variables so they can be used in multiple places.

Simple example:

  • Set variable in load script :
    • set vToday = today() ;

  • Dollar expand the variable in a Text Box
    • =$(vToday)
antoniotiman
Master III
Master III

Hi Andrew,

You can use macro to take the value of cell and store in variable, like this

set obj = ActiveDocument.GetSheetObject("CH561")
  set v = ActiveDocument.Variables("vTotal")
v.SetContent obj.GetCell(1,5).text*1,true

etc.

The question is where call this macro

e.g. in open sheet or button

Regards,

Antonio

Anonymous
Not applicable
Author

Before contemplating macros it would be wise to read this blog post.

Macros are Bad

antoniotiman
Master III
Master III

Hi Bill,

for long time I use this macro and no problem (desktop,server).

The blog which You report is generic, however, very important.

Regards,

Antonio