Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
samuel_brierley
Creator
Creator

formula not working when put in a table

hi all,

i have the below formula (its a length one) that works fine in a text box and with a single date filtered but when i paste it into a chart with date as the dimension it nulls out. if i filter to one day the formula works in the table but obviously defeats the point..

thanks for any help.

num

((10-Sum(Aggr( if( ArbitrationInput.Group.rQo = only( {$< [/rec/parameter] = {'rMin'},[/#text] = {'CommonParameters'},[Config] = {Live}>}[/rec/parameter/curval]) and
ArbitrationInput.Group.rOOk < only( {$< [/rec/parameter] = {'rMax'},[/#text] = {'CommonParameters'},[Config] = {Live}>}[/rec/parameter/curval]) and
below(ArbitrationInput.Group.rQo,1,1) > only( {$< [/rec/parameter] = {'rMin'},[/#text] = {'CommonParameters'},[Config] = {Live}>}[/rec/parameter/curval]), 1,'')
,
Time))
/(
sum(aggr(if(ArbitrationInput.Group.rOOk < 950,1,''),Time))/60)/1.5),'##')

1 Solution

Accepted Solutions
rubenmarin1

Hi Samuel, you can try to add Date to the aggr function:

((10-Sum(Aggr( if( ArbitrationInput.Group.rQo = only( {$< [/rec/parameter] = {'rMin'},[/#text] = {'CommonParameters'},[Config] = {Live}>}[/rec/parameter/curval]) and
ArbitrationInput.Group.rOOk < only( {$< [/rec/parameter] = {'rMax'},[/#text] = {'CommonParameters'},[Config] = {Live}>}[/rec/parameter/curval]) and
below(ArbitrationInput.Group.rQo,1,1) > only( {$< [/rec/parameter] = {'rMin'},[/#text] = {'CommonParameters'},[Config] = {Live}>}[/rec/parameter/curval]), 1,'')
, Date,
Time))
/(
sum(aggr(if(ArbitrationInput.Group.rOOk < 950,1,''), Date,Time))/60)/1.5),'##')

View solution in original post

3 Replies
robert_mika
Master III
Master III

Could you attached your file?

rubenmarin1

Hi Samuel, you can try to add Date to the aggr function:

((10-Sum(Aggr( if( ArbitrationInput.Group.rQo = only( {$< [/rec/parameter] = {'rMin'},[/#text] = {'CommonParameters'},[Config] = {Live}>}[/rec/parameter/curval]) and
ArbitrationInput.Group.rOOk < only( {$< [/rec/parameter] = {'rMax'},[/#text] = {'CommonParameters'},[Config] = {Live}>}[/rec/parameter/curval]) and
below(ArbitrationInput.Group.rQo,1,1) > only( {$< [/rec/parameter] = {'rMin'},[/#text] = {'CommonParameters'},[Config] = {Live}>}[/rec/parameter/curval]), 1,'')
, Date,
Time))
/(
sum(aggr(if(ArbitrationInput.Group.rOOk < 950,1,''), Date,Time))/60)/1.5),'##')

samuel_brierley
Creator
Creator
Author

You absolute beaut!!! so obvious now i just assumed adding it into the dimension would do this.

thanks