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

Get Total value from a Table

Hello, i have a simple question but i cannot manage to do it..

I have a table with columns: ID , Sales ( value is 1 or 0 )

On the top of the table, there are automatic TOTAL rows which print the good value.

Here comes my issue, i would like to get the Total value and display it in a Text Object for example.

Is it possible to do it?

Thank you in advance

please find attached an example picture, i would like the total value 13 instead of 1515

17 Replies
Not applicable
Author

qqq.JPGIs it ok for you?

Not applicable
Author

Your language isn't my native, so check the spellings. This is working for me though with my example data.

=aggr(sum(total Sales), Ressource, [Charge consommée], [Charge restante], Absences)

Not applicable
Author

Can you show me it working on a qv file please? It cannot find the sales field .

On my table, Ressource is a Dimension and the others are expressions, does the problem is here?

Thanks for your help

Not applicable
Author

=aggr(ADD YOUR TOTAL SALES EXPRESSION HERE, ADD YOUR DIMENSION HERE.)

I will try get a QVW for you after my lunch. edit: Would be helpful if you can scramble your data and upload your QVW, that way we can't see any of your companies data.

Google for scramble data in QlikView/

Not applicable
Author

You can find the table in the file attached..

I cannot tackle this problem.

ariel_klien
Specialist
Specialist

Hi,

You can use aggr() function (like wallerjc suggested)  or use Macro:

Create a variable = vNoRowCH01

CH01 is the Object ID - you can see/change it in Chart properties > General

Sub NoofRowsCH01

  set table = ActiveDocument.GetSheetObject("CH01")

  rows =  table.GetRowCount - 1

'msgbox "Number of Rows in Straight table is " & rows

  ActiveDocument.Variables("vNoRowCH01").SetContent rows, True 

End Sub

Then use the variable...

BR

Ariel

Not applicable
Author

hi mate sorry i went for lunch. Check out the attached, let me know if you want it explaining.

edit: it was very difficult working with names I couldn't read! the amount of typos i made in the expressions was not even funny...

Not applicable
Author

Thank you a lot my friend, French is not so easy !!!