Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Total for variable

Hi

I have expression in table called 'vPass' that return result 0 or 1.

The vPass value is varible called 'vCalTrueFalse':

vPass =$(vCalTrueFalse).

I need to create total field for vPass in TextObject at dashboard.

I tried ' Sum($(=vCalTrueFalse))' but it give me an error: 'Nested aggregation not allowed'.

How can I do it?

Thanks!

26 Replies
stabben23
Partner - Master
Partner - Master

Hi Ravit,

And how does you Variable vCalTrueFalse looks like, is it a aggregation?

Anonymous
Not applicable
Author

vCalTrueFalse = if($(vCalPassFail)='Pass', 1,0)

vCalPassFail =

if

((ParamID =98 or ParamID=99) and  $(vResult)<vMCS,'Fail',

if

((ParamID =102 or ParamID=100) and TestnameID<3 and $(vResult)<vGoodput, 'Fail',

if

(DashboardID =1 and $(vResult)<Connectivity, 'Fail',

if

(DashboardID =5 and $(vResult)<TotalSamplingTime, 'Fail',

if

((ParamID =102 or ParamID=100) and TestnameID>2 and $(vResult)<vGoodput_FDX, 'Fail','Pass')))))

sdmech81
Specialist
Specialist

Hi,

Plss attach sample..

Anonymous
Not applicable
Author

Pass.PNG

Pass column represent variable vCalPassFail

vPass column represent variable vTrueFalse

What I need to do is show in text object the 'Pass' percentage.

vinieme12
Champion III
Champion III

Try

Sum( AGGR( SUM($(=vCalTrueFalse)) , YourTableDimensions))


or post the app

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable
Author

Its return zero.

How can I post the app?

uacg0009
Partner - Specialist
Partner - Specialist

Hi Ravit,

If possible could you please attach a sample file?

Because normally I think =sum(vCalTrueFalse)   is enough.

Thanks.

Aiolos Zhao

Anonymous
Not applicable
Author

I cannot attached the file (security issue).

Any way, its still return zero.

See attach table and Grade, is there another way to calculate grade?

Pass.PNG

vinieme12
Champion III
Champion III

see this post on attaching a file

Uploading a Sample

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