Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Total count

Hi Experts,

i m working on employee dashboard.

i have the following table.

Table1:

Load Branch,

        Jobtitle,

        Empcode

from table.qvd(qvd);

Jobtitle has values like Manager, Director, Assistants, etc.

Empcode has Vacancy1, Vacancy2, Left, Poor Performance, etc

Now i have done a pivot table with branch & Jobtitle as dimension, Count(Empcode) as expression.

i need to calculate values which is not equal to zeros and filter particular Empcode.

So, i did the expression as:

if(COUNT(Empcode )<>0 and MATCH(Empcode,'Vacancy1','Vacancy2''),COUNT(Empcode),'')

it works fine. but the totals are giving nulls.

Please help me to correct the expression.

7 Replies
sunny_talwar

Try adding Sum(Aggr()) around your expression with all the chart dimensions and see if that works.

swuehl
MVP
MVP

Try

=Sum( Aggr(

if(COUNT(Empcode )<>0 and MATCH(Empcode,'Vacancy1','Vacancy2'), COUNT(Empcode)),

     Branch, Jobtitle))

sathishkumar_go
Partner - Specialist
Partner - Specialist

please post your application with sample data

-Sathish

Not applicable
Author

Hi,

Try this

COUNT({<Empcode -={0}>} Distinct Empcode)

Hope it helps!

Greetings,

Not applicable
Author

Swuehl, Sunny,

when i do sum(aggr()), it is giving total correctly but displaying zeros in some vacancies.

but the condition is COUNT(Empcode )<>0.

please help me

swuehl
MVP
MVP

Maybe like this:

If(Dimensionality() = 0,

Sum( Aggr(

if(COUNT(Empcode )<>0 and MATCH(Empcode,'Vacancy1','Vacancy2'), COUNT(Empcode)),

    Branch, Jobtitle))

,

if(COUNT(Empcode )<>0 and MATCH(Empcode,'Vacancy1','Vacancy2'), COUNT(Empcode),'')

)



I have the feeling there must be a better way to perform your count. Could you upload a small sample QVW?

sasikanth
Master
Master

HI,

Try this

count(if(Aggr(Count(EmpCode),Branch, Jobtitle )<>0 and MATCH(Empcode,'Vacancy1','Vacancy2'),EmpCode))