Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Chanty4u
MVP
MVP

Re:Sum and exclude '"0"

hi all,

I have expression lik below

=num(

sum(Complexity)

/

(11111

sum({<desc={'Design - IT',' Design - RT'}>}hrs)

/8

)

,'##.##')

exclude.png

i used same formualue in   straitght table  nummerator and denomenator.

am getting the sum of abve /sum of below exp.

My req is---   where  sum({<desc={'Design - IT',' Design - RT'}>}hrs)    this value is '0' shwn in chart  that corresponding values shud nt count and  remaing shud be count / total of sum({<desc={'Design - IT',' Design - RT'}>}hrs) .

example:  there is 47 value.. corresponig 172...   the result shud be   172/408.  is my result.

thnks in advance

87 Replies
Chanty4u
MVP
MVP
Author

the error its nt reading -={0}   in text object bro

Chanty4u
MVP
MVP
Author

in stright we will use   total mode sum of rows.... in text object how can we get?

sunny_talwar

I don't see any issue in posting a screenshot like the one I posted above. There is no confidentiality issues with this as well. Please do so, or else I won't be able to verify that desc is available or not.

Chanty4u
MVP
MVP
Author

Ok sunny see dis desc.png

sunny_talwar

Exactly, that's what I have been telling you, why are you using desc, when the field name is cl_ktlo_desc?

=Sum({<cl_ktlo_desc={' Design - SIT',' Design - RT', hrs -= {0}>}Complexity)/

Sum(TOTAL{<cl_ktlo_desc={'Test - Design - SIT','Test - Design - RT'}>}hrs)

Chanty4u
MVP
MVP
Author

hmm..that is wat sunny i told u...what are the  exact field name i hve am using in expresion and tried even though it is shwng error in expression.

sunny_talwar

Hahahaha I thought that the image you showed is the expression you are using. Are you using QV 11.20 SR8 or before? You might be seeing a red line underneath -= {0} because the expression editor is unable to understand syntax, but it doesn't necessarily means that it is incorrect.

To get the same total as straight table's total mode of Sum, you can do this:

Sum(Aggr(YourExpression, YourDimensions))

Chanty4u
MVP
MVP
Author

Hmmm that i knw need to use exact field names bro...am using Qv11.20 sr12 64bit edition.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this expression in Text Object

=IF(Sum({<cl_ktlo_desc={'Test - Design - SIT','Test - Design - RT'}>}cl_ktlo_hrs) <>0, Sum(Test_Complexity))

/

Sum({<cl_ktlo_desc={'Test - Design - SIT','Test - Design - RT'}>} TOTAL cl_ktlo_hrs)

Getting 11.427172582619, if this is not expected let me know your expected number.

Regards,

jagan.

Anonymous
Not applicable

sum({<column  name={'*'}-column name={'0'}>}Distinct hrs)