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

Ignore filter in aggregated if expression

I have an expression to count the times the equipment goes down (next start floor is lower than current one). This is aggregated per equipment and timestamp

=count(aggr(if(([start_floor]-below([start_floor])>0),1),[equipment],[timestamp]))

 I also have building filter, but the measure is set to be "Always one selected value". However now I want to show the above measure as a bar chart across all buildings. With simpler expression this works for example the next expression counts the average travel time for the buildings with less than 10 floors.

=avg({<[building]=>}if(Aggr(max({<[building]=>}[start_floor]),[building])<=10,travel_time))

 

I can't get the top expression to work showing all buildings. I've tried things like 

=count({<[building]=>} aggr(if(([start_floor]-below([start_floor])>0),1),[equipment],[timestamp]))

 and other variations but they don't work. Any idea?

1 Solution

Accepted Solutions
sunny_talwar

May be this

=Count({<[building]>} Aggr(
  If(Only({<[building]>}[start_floor]) - Below(Only({<[building]>}[start_floor])) > 0, 1)
, [equipment], [timestamp]))

View solution in original post

2 Replies
sunny_talwar

May be this

=Count({<[building]>} Aggr(
  If(Only({<[building]>}[start_floor]) - Below(Only({<[building]>}[start_floor])) > 0, 1)
, [equipment], [timestamp]))
anseglko
Creator
Creator
Author

Thank you! Exactly what I was looking for