Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Highlighted
Chanty4u
Esteemed Contributor III

RE:Overall count

Hi all,

What wrng in my expression? in stright table.

Metric: distinc pass&fail for exec testid

and also apply modified date on  condition to view he latest record.

=Count(

if(

Aggr

(

DISTINCT

(

max({<Exec_Status={'Passed','Failed'}>}Exec_ModifiedOn),

lvl_id,Period,Exec_TestID

)

=Exec_ModifiedOn

,Exec_TestID

))

)

19 Replies
MVP & Luminary
MVP & Luminary

Re: RE:Overall count

HI,

I am not sure what you are try to do with the expression, there are lot of syntax errors. = at the end of the expression,

Try this expression

=Count({<Exec_Status={'Passed','Failed'}>} Aggr(

max({<Exec_Status={'Passed','Failed'}>}Exec_ModifiedOn),

,lvl_id,Period

,Exec_TestID

))

If not working attach sample data and your expected output.

Regards,

Jagan.

Re: RE:Overall count

Not really sure what the output requirement is but may be If needs to go within the Aggr?

May be this:

=Count(Aggr(DISTINCT If(Max({<Exec_Status={'Passed','Failed'}>}Exec_ModifiedOn) = Exec_ModifiedOn, Exec_TestID), lvl_id,Period, Exec_TestID))



Chanty4u
Esteemed Contributor III

Re: RE:Overall count

my req is .... whenevr am selecing any filer  in status  ...it is gvng the exact count ....

meanwhile  i hve clear all selections it is nt gvng exact count.

Re: RE:Overall count

For each row you are not getting the correct count or the overall count at the top(or bottom) is getting calculated incorrectly?

Chanty4u
Esteemed Contributor III

Re: RE:Overall count

and  this exp

=Count(Aggr(DISTINCT If(Max({<Exec_Status={'Passed','Failed'}

and not IsNull(Exec_TestID)>}Exec_ModifiedOn)

= Exec_ModifiedOn, Exec_TestID), lvl_id,Period, Exec_TestID))

in exec_test id  i hve nul id means some data hvng no id.  how can i use exp with isnull?

MVP & Luminary
MVP & Luminary

Re: RE:Overall count

Hi,

If you attach sample data/file and your expected output then it is easier to give solution.  Otherwise it is very difficult.

Not sure what dimensions are you using, datamodel etc.

Regards,

Jagan.

Chanty4u
Esteemed Contributor III

Re: RE:Overall count

in  each row getting correct values.....top total values are nt getting correct

Re: RE:Overall count

Try this:

=Count(Aggr(DISTINCT If(Max({<Exec_Status={'Passed','Failed'}, Exec_TestID = {"=Len(Trim(Exec_TestID)) > 0"}>} Exec_ModifiedOn) = Exec_ModifiedOn, Exec_TestID), lvl_id,Period, Exec_TestID))

or

=Count(Aggr(DISTINCT If(Max({<Exec_Status={'Passed','Failed'}, Exec_TestID = {"=IsNull(Exec_TestID)) = 0"}>} Exec_ModifiedOn) = Exec_ModifiedOn, Exec_TestID), lvl_id,Period, Exec_TestID))

Chanty4u
Esteemed Contributor III

Re: RE:Overall count

dimensions:

lvl id


period