I have a list of Fire Ext. types that pass or fail inspections daily and I want to show the trend from the last 6 months. So I want to be able to select a month of Jan 2017 and show that month and the last 6 months of that type if it passed or failed.
I'm not really sure how to do this.
Just to understand your question… you want to select a Date (Ex: Jan-2017) and you want the graph to show information from August to January?.. six months back from the date you choose?
regarding your post if you are talking about a six month trend and take as example january 2017 , i guess you have a MonthYear dimension in your chart and a Date field in your data set.
Here i guees you have a field called TEST with possible value 'Pass' and 'Fail'
So to count the last six month number of test Pass :
So to count the last six month number of test Fail :
Sorry for not getting back to you. I worked around it because that was not working, I'm making a few changes in the script which I think was affecting my calculations.
Thank you so much for your help though!!