Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
KC3
Creator
Creator

Not Getting Total

Dear Qlikians,

Please help me to get the total, stuck here from last 3 days.

My Variant cost is a connecter file

Please PFB SS

KC3_0-1669285752784.png

KC3_2-1669285901431.png

 

KC3_1-1669285820875.png

 

Labels (4)
9 Replies
Katebis
Partner - Contributor
Partner - Contributor

Hi, you have to expand your measure menu and scroll down to find the total function

Katebis_1-1669286376896.png

 

then under Style you have to enable it

Katebis_0-1669286325115.png

 

KC3
Creator
Creator
Author

Hi,

Can you please share it in english.

Also i have that much of option.

In measure menu

KC3_1-1669286803160.png

 

In overall

KC3_0-1669286764685.png

 

vinieme12
Champion III
Champion III

use an aggregation function    like Sum() or Avg() for measures

= SUM( Qty * [Variant Cost] )

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
KC3
Creator
Creator
Author

will not get the perfect data total will come as the formula for the same will be Sum(Quantity)* [Variant Cost].

After applying this formula will not get the total.

 

SS for the same the data is coming correct in Sum(Quantity)* [Variant Cost], but the total is not coming

 

KC3_0-1669361667147.png

 

vinieme12
Champion III
Champion III

Sum(Quantity)* [Variant Cost]  is different from  Sum(Quantity * [Variant Cost] ) 

 

Or you can wrap your expressions in AGGr()

 

sum(  AGGR(    Sum(Quantity)* [Variant Cost]   ,  Dim1, Dim2,...) )

 

Dim1,Dim2 is the list of dimensions used in the pivot chart

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
KC3
Creator
Creator
Author

Yes I am saying the same to you if i sold 100 units and my  Variant Cost is 10 then will apply the formula Sum(Quantity)* [Variant Cost]  so that will get 1000 if i applied that formula the data will b wrong that's why i shared the SS of the same.

 

Thanks

KC

hic
Former Employee
Former Employee

@vinieme12 is right. You cannot use a naked field reference like [Variant Cost] without getting NULL in the totals row.

So, you must wrap it in an aggregation function, or use Sum(Aggr(...)).

See also https://community.qlik.com/t5/Design/Use-Aggregation-Functions/ba-p/1475833

HIC

KC3
Creator
Creator
Author

Not be able to getting proper answer can you please help me with formula

hic
Former Employee
Former Employee

All of the following will return a value of the total row.

Sum(Quantity*[Variant Cost])
Sum(Quantity)*Avg([Variant Cost])
Sum(Aggr(Sum(Quantity*[Variant Cost]), Dim1, Dim2,...) )
Sum(Aggr(Sum(Quantity)*Avg([Variant Cost]), Dim1, Dim2,...) )

(Dim1,Dim2 is the list of dimensions used in the pivot table)

Which one to use depends on how your data looks: Since Quantity and [Variant Cost] are in two different tables, there is the possibility of a many-to-many relationship. If you know that one row in the fact table ALWAYS is linked to only one single value of [Variant Cost], you should use
Sum(Quantity*[Variant Cost])

If there can be several values, you should probably use
Sum(Aggr(Sum(Quantity)*Avg([Variant Cost]), Dim1, Dim2,...) )

HIC