Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Text box expression

Hi Experts,

i have attached a sample qvw.

It has a pivot table with some calculations by product number.

My last expression 'Resp Diff' is a time difference.

i need to display the average time of that 'Resp Diff' (as a summary level) in a text box.

Please someone help me with the expression

1 Solution

Accepted Solutions
sunny_talwar

Slight better expression:

=Interval(Avg(Aggr(If(

  RangeSum(time_effective, -Pick(Match(Category, 'Red', 'Blue'), clock_start, Actual_clock_start))> (first_unit_time-Actual_clock_start) and

  time_effective_flag = 1,

  RangeSum(time_effective, -Pick(Match(Category, 'Red', 'Blue'), clock_start, Actual_clock_start), -(first_unit_time-Actual_clock_start))), ProductNumber, Category, Type)))

View solution in original post

5 Replies
sunny_talwar

May be this?

=Interval(Avg(Aggr(if(

  if(Category='Red',time_effective-clock_start,  if(Category='Blue',time_effective-Actual_clock_start))> (first_unit_time-Actual_clock_start) and

  time_effective_flag=1,

  if(Category='Red',time_effective-clock_start,  if(Category='Blue',time_effective-Actual_clock_start))-(first_unit_time-Actual_clock_start)), ProductNumber, Category, Type)))

sunny_talwar

Slight better expression:

=Interval(Avg(Aggr(If(

  RangeSum(time_effective, -Pick(Match(Category, 'Red', 'Blue'), clock_start, Actual_clock_start))> (first_unit_time-Actual_clock_start) and

  time_effective_flag = 1,

  RangeSum(time_effective, -Pick(Match(Category, 'Red', 'Blue'), clock_start, Actual_clock_start), -(first_unit_time-Actual_clock_start))), ProductNumber, Category, Type)))

Gysbert_Wassenaar

Personally I'd just change the chart type of that table to Straight Table and set the Total Mode of the last expression to Average of Rows.


talk is cheap, supply exceeds demand
Not applicable
Author

thank you so much sunny

sunny_talwar

No problem