Jump to content

Difference in cumulative sums over different time columns


Joana Guedes

Recommended Posts

Dear community,

My data is structured as follows:

- rows represent items

- I have date columns with item creation date and item delivery date

I want to knowfor every month how many items created so far have not been delivered. Basically, for each month I need to compute the difference between the bar charts in the attachment.

I've been playing around with hierarchies and OVER functions but have not found a way to do this, Is it at all possible

The only way I've managed to achieve these calculations is by doing some data wrangling outside of Spotfire. But I come across this type of request so often that it has to be a common calculation to carry out. I'm hoping it can be achieved in Spotfire in a more flexible way.

 

Thank you for your help! :)

Link to comment
Share on other sites

Simply create a new calculated that returns 1 when the delivery date is empty or when the month of the delivery date is not equal the month of creation date. Depending on the question you try to answer... Else return 0.

Then use this column in a bar chart. That's it!

If([delivery date] is null, 1, 0)

 

If(month([delivery date]) = month([creation date]), 0, 1)

Link to comment
Share on other sites

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...