Jump to content

Date Filter not filtering on calculated columns


Manoj Chaurasia

Recommended Posts

Hello Spotfire Experts,

 

I am trying to make a simple report(as its the my first spotfire report) but somehow not able to achive the expected results.

 

Please refer the attached screenshot: [first.jpg]

 

here, StoreNo, CustomerGrade and karat are used as distinct filelds and rest of the columns are calculated based on the multiple records available in the db table. like, TotalCost(in the RED box) is the sum of all the records in DB having StorNo: 2234, CustomerGrade: C, Karat: 10K and as the other RED box, total no of records partcipated in the calculation are 6.

here TotalCost is using this calculation: Sum([Cost]) OVER ([storeNo],[Karat],[CustomerGrade])

 

Now, if I change the reduce the no of days from the TransactionDate (this is one of my information link field but I am not showing it on report but it need to be used as filter), then though the no of records are reduced like and only those which fulfill the date range are shown in the visualization.

 

but TotalCost calculated column still shows the same amount as long as there is a single record satisfying the filter range.

that means filter and calculated columns work independently, is this correct

 

Please refer the attached screenshot: [second.jpg]

Is there any way we can calculated only those rows which satisfy the filter range

 

Your response is much appreciated.

 

Thanks,

Varun

Link to comment
Share on other sites

  • 2 years later...

Varun,

 

Calculated values will use all data and don't honor filters from your filtering schemes. In order to work around this, I've had to hard-code filters into the calculated column equation with if-statements. The major downside to this is that the formula is not dynamic. If you are intending to plot this column, you can use a custom expression, which will honor your filtering scheme.

Link to comment
Share on other sites

  • 4 years later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...