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

Expression calculates max pass rate, how to tell other information about what was chosen as max pass rate?

I have a somewhat complicated expression, but basically it determines the maximum PASS for any build.

=if(GetCurrentField(TestDrillIn)='Wk'

          ,

          (max(aggr(   SUM(Pass),Build))),   

How do I determine the Build that this max came from?  Seems as though would be simple, but I keep getting no result.

Keep in mind, the above is a part of a more complicated expression that determines this information at different dimension levels. 

1 Solution

Accepted Solutions
Not applicable
Author

Team,

To compute the build that corresponds to the Max Pass Rate as and return the last build with such a value, have an expression that seems to work but a bit complicated.  Used the following expression:

=if(substringcount(  aggr(concat(aggr(if(rank(   (max(aggr(   SUM(Pass),              Build)))                 ,1,1)=1,Build),Wk,Build),','),Wk) , ',') >=1, subfield(     aggr(concat(aggr(if(rank(   (max(aggr(   SUM(Pass),              Build)))                 ,1,1)=1,Build),Wk,Build),','),Wk)   , ',' , substringcount(  aggr(concat(aggr(if(rank(   (max(aggr(   SUM(Pass),              Build)))                 ,1,1)=1,Build),Wk,Build),','),Wk) , ',')+1)    , aggr(concat(aggr(if(rank(   (max(aggr(   SUM(Pass),              Build)))                 ,1,1)=1,Build),Wk,Build),','),Wk)     ) 

Got this idea from reading the following by Rob W and John W on this topic:

http://community.qlik.com/message/16998#16998

Thanks to John W and Rob W for posting their update.  When I get done, I will post my qlikview again, more work ahead. 

D

View solution in original post

5 Replies
Not applicable
Author

=max({<Pass={"$(=MAX(Pass))"}>} Build)

Seems the above gave me some result for the build with the most Pass for the last two weeks.  However, no results are generated (I get -) for all the other weeks.  Not sure why. 

When I use aggr like have in my complicated expression, also just get - back. Not sure why.

Not applicable
Author

Is the logic to compare this expression to a a series expression that has the max for the week and get the build number:

=          (max(aggr(   SUM(Pass),              Build)))  

How would I write the above in series?

D

Not applicable
Author

See the attached Qlikview.  The maximum Pass test for a week is show by column MaxAggrSumBuild. 

However, in columns SeriesMaxBuild and AttemptMaxBuildforMaxPass, attempts are made to display the Build for that maximum.

I am getting - instead of an answer, does anyone know why, how to fix?

Thanks,

D

Not applicable
Author

I try the following, and it does not give me the Min Build with the Max(Pass), anyone know why not, how to do?

Min({< Pass = {"=Pass=Aggr(nodistinct max(Pass),Build)"} >} Build)

Not applicable
Author

Team,

To compute the build that corresponds to the Max Pass Rate as and return the last build with such a value, have an expression that seems to work but a bit complicated.  Used the following expression:

=if(substringcount(  aggr(concat(aggr(if(rank(   (max(aggr(   SUM(Pass),              Build)))                 ,1,1)=1,Build),Wk,Build),','),Wk) , ',') >=1, subfield(     aggr(concat(aggr(if(rank(   (max(aggr(   SUM(Pass),              Build)))                 ,1,1)=1,Build),Wk,Build),','),Wk)   , ',' , substringcount(  aggr(concat(aggr(if(rank(   (max(aggr(   SUM(Pass),              Build)))                 ,1,1)=1,Build),Wk,Build),','),Wk) , ',')+1)    , aggr(concat(aggr(if(rank(   (max(aggr(   SUM(Pass),              Build)))                 ,1,1)=1,Build),Wk,Build),','),Wk)     ) 

Got this idea from reading the following by Rob W and John W on this topic:

http://community.qlik.com/message/16998#16998

Thanks to John W and Rob W for posting their update.  When I get done, I will post my qlikview again, more work ahead. 

D