Austin Fox Posted February 5, 2020 Share Posted February 5, 2020 I have a table of value,Date,and Area. I currently have: ValueForMin([Date],[value]) plotted by BinByDateTime([Date],"Year",0) This is ok except that when I have multiple Areas in a YearI only get the value of the oldest record regardless of area. It would be better to get the sum of the oldest records by area. The simplist of what I tried is: Sum(ValueForMin([Date],[value]) over ([Area])) Spotfire only tells me that is expression is invalid. What is wrong with this expression or how can this be done Thanks for your help!! Austin Link to comment Share on other sites More sharing options...
Khushboo Rabadia Posted February 8, 2020 Share Posted February 8, 2020 Use Intersect after over i.e. Over(Intersect([Area])) Link to comment Share on other sites More sharing options...
Austin Fox Posted February 10, 2020 Author Share Posted February 10, 2020 This does give values but not the correct ones. I am not completely sure why but I suspect The ValueForMin function in Sum(ValueForMin([Date],[value]) over (intersect([Area]))) ends up acting on dates rather than the aggregated year, thus giving a huge value. Adding Intersect([Area],[Axis.X]) to make it explicit makes no difference. Replacing [Date] with [Axis.X] in ValueForMin would seem like the right thing to do but it says invalid type. Removing the Sum seems to give the ValueForMin for that year. And doing the sum as part of the aggregation makes the value huge --> not sure why though. Thoughts Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now