Introducing the all-new TIBCO Community site!

For current users, please click "Sign In" to reset your password and access the enhanced features. If you're a first-time visitor, we extend a warm welcome—click "Sign Up" to become a part of the TIBCO Community!

If you're seeking alternative community sites, explore ibi, Jaspersoft, and Spotfire.

Jump to content

Hi, I am trying to find the increase in expenses by different department from Q1 to Q2. How can I create a chart for it

Kian Liong Tan

Recommended Posts

FOr the table, we have information of the date, department and amount of expense.

The information is from Jan-Jun

How can I create a graph where I am able chart the difference between Q2 and Q1 expenses for each department.

Formula would look like this

Department 1: Apr + May + Jun - Jan -Feb -Marc (Department 1)

Department 2:Apr + May + Jun - Jan -Feb -Marc (Department 2)

Link to comment
Share on other sites

Spotfire has very helpful aggregation methods available for you to do something like this. It will be very beneficial for you, when your month column is of type datetime. This will allow you to use the time hierarchy (year -> quarter -> month -> ..) on the X-axis. And this can also be used on the Y-axis in your aggregation. As you will see later, the Y-axis will adjust accordingly.

So let's assume this dataset where I have a month column as a string. First I create a datetime coumn. Skip this step if your column already is of type datetime:

ParseDate("2021-" & [Month] & "-01","yyyy-MMM-dd")

Then I build different bar charts. On the X-Axis I have my datetime column with year/quarter/month. For the lower two charts I simply select a different aggregation method on the y-Axis.You can then move the position of the slider from month (center vis) to quarter (lower vis) to see how everything adjusts automatically. Isn't that beautiful ;)




When you select the aggregation method, the custom expression will be generated for you. Check the Spotfire help to learn more about "Level" and "number of steps". Or play around with your data to explore these features.

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