6 Replies Latest reply on Apr 18, 2017 1:25 AM by Shaun Swanepoel

Income after a certain point based on income?

Hi there,

I hope that this makes sense.

We have accounts that make purchases. They generate a certain income which results in a certain amount of profit.

Let's say that when an account's income reaches x, how much profit is created after that point?

I want to be able to say, once we have an income of x from an account (x is variable), how much profit do we receive?

Please assist with the math - I am at somewhat of a loss.

Attached is some data, aggregated to a date level.

Dimensions: Date, Account ID

Measures: Income, Net Profit, Purchase

I want to be able to total the following:

Net Profit, Purchase AFTER Cumulative Income = x on a FIXED Level (Account ID Level)

It is also possible to calc this in SQL Management Studio and Extract it from there in Custom SQL Query, if this cannot be done in Tableau perhaps I can do it with Custom SQL instead?

Thanks so much for all the geniuses out there who make Tableau awesome.

Using Tableau 10.2.0

Shaun

• 1. Re: Income after a certain point based on income?

Hi Shaun,

I have created the following view by fixing the Income>=100 for all of your accounts. If you need to fix this X for individual , then you need to write separate Calc for each of them, so in the screenshot for each of your account if Income is greater than 100 bthen Profit is calculated otherwise it is 0. You can modify accordingly.

Hope it Helps!!!

Thanks

Deepak

• 2. Re: Income after a certain point based on income?

Hi there Deepak,

Thanks so much.

This is yields the total profit of the account if income is x.

I'm trying to calc, When income reaches x, what is the profit from there onwards.

So, any profit made on the income of x is moot, if that makes sense?

Cheers,

SS

• 3. Re: Income after a certain point based on income?

Hi Shaun,

I think you need variable X so I created a parameter and please check attached. You need to select the income level and it will tell you what is net profit. If it helps, please mark it Helpful and CORRECT to close thread.

Thanks

Deepak

• 4. Re: Income after a certain point based on income?

Hi there Deepak,

Thanks so much for the help.

This is still showing the total profit, not the profit after the income reaches X. The below is basically what I need - I need the profit up until the income amount of x to be disregarded.

We have reasoned that you would first need to find the date when the income reaches x, and then somehow sum the income from after that date.

Cheers,

SS

• 5. Re: Income after a certain point based on income?

Hi, Shaun

Not sure I understand your requirements correctly, but below is my solution for your reference.

Let's assume the income threshold is set to 10000 and all the data colored in orange should be excluded, is that right?

And if above is correct, there are two options for the net profit, one is day by day profit and the other is running total of net profit, which one works for you?

I attached the workbook as reference. Hope this could help.

ZZ

1 of 1 people found this helpful
• 6. Re: Income after a certain point based on income?

Hi there ZZ,

This is a lot better, thanks.

It seems to do what I want it to do.

I will use it, thanks so much. Currently all the calculations are being done on an SQL level, but I would like to move them to Tableau level.

Cheers and thanks,

SS