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

Changing date range in bar chart

Hello 🙂

I have the following (simple) problem:

In the following bar chart I want to show the data since 2010.

schuffe_0-1622095938216.png

The formula i use looks like this (working perfectly):

Sum(aggr(Sum(If(Date=RandColumn,1,0))/count(Date), Date))

And now I want to bring in the Filter 'Date > 2009'

So i thought it has to be something like this : 

{<  YEAR(Date) > 2009  >}

But no matter where I put this condition it's not working.

 

Can anyone help ? 

Thanks 🙂

1 Solution

Accepted Solutions
GaryGiles
Specialist
Specialist

A couple of issues with your set analysis.  First, you can't use a function like Year() as the left side of a comparison.  You would need to create a Year  field in the load scripts to filter on Year in set analysis.  Second, the correct syntax for using greater than in set analysis would be is {$< fieldname={">2019"} >} :

For now, you could try:  {<  Date={">01/01/2019"}  >}

 

View solution in original post

2 Replies
GaryGiles
Specialist
Specialist

A couple of issues with your set analysis.  First, you can't use a function like Year() as the left side of a comparison.  You would need to create a Year  field in the load scripts to filter on Year in set analysis.  Second, the correct syntax for using greater than in set analysis would be is {$< fieldname={">2019"} >} :

For now, you could try:  {<  Date={">01/01/2019"}  >}

 

schuffe
Contributor III
Contributor III
Author

Thank You, that's working 🙂