Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
thrilos
Contributor
Contributor

Filter Data in a Line Chart

Hi,

I am working on Realease November 2019 and I am trying to filter my Line chart:

thrilos_0-1611743538455.png

with this statement:

if (([Age) < '15' and [Number] = '1' , Avg([Weight]),)

but it does not work, for whatever reason. I also tried it with nested if's but it does not work also. Any ideas?

Labels (1)
1 Solution

Accepted Solutions
tm_burgers
Creator III
Creator III

Would set analysis work:

avg({< [Age] ={">15"}, [Number] = {'1'}>} [Weight])

 

View solution in original post

2 Replies
tm_burgers
Creator III
Creator III

Would set analysis work:

avg({< [Age] ={">15"}, [Number] = {'1'}>} [Weight])

 

PradeepK
Creator II
Creator II

Avoid using if conditions.. Use Set Analysis

Avg( {< Age = {">15"} , Number = {1} >} Weight)​

 

Better Solution -> Move this condition to Script and create flag

if( Age > 15 and Number = 1, 1 ,0) as flag​


And in expression just write

Avg( Weight * flag )​