sum wrt previous outstanding amount and month current amount

0 votes
Hi i want to create column wrt balance to be paid wrt to previous month i.e the previous month outstanding amount and current month amount. How to do this? if my previous amount to be paid is 4000 and only 3000 is paid then 1000 should be added to this month amount to be paid.
Jun 6, 2019 in Tableau by keerthi
587 views

1 answer to this question.

0 votes

Hi Keerthi,

I used a similar data to show whether the day has reached sales for day or else added to next day to show the demo.

The below code is for finding the amount to be paid after adding previous balance - To be paid

IF ISNULL(ZN(SUM([AMT PAID])) - LOOKUP(ZN(SUM([AMT PAID]) - [AMT TO BE PAID]), -1)) THEN [AMT TO BE PAID] ELSE ZN(SUM([AMT PAID])) - LOOKUP(ZN(SUM([AMT PAID]) - [AMT TO BE PAID]), -1) END

Use below code to find the amount balance that is paid in the next step - balance

[To be paid] - SUM([Sales])

A simple demo image for your problem - 

Hope this helps you!

answered Jun 6, 2019 by Cherukuri
• 33,030 points

Related Questions In Tableau

0 votes
1 answer

Sum of previous two months sales where the current month is entered by the user.

It can be achieved easily by creating ...READ MORE

answered Aug 14, 2018 in Tableau by AwesomeSauce
• 860 points
3,857 views
0 votes
1 answer

Is it possible to merge year, month and date in Tableau?

Remove all the date pills and drag ...READ MORE

answered May 10, 2018 in Tableau by ffdfd
• 5,550 points
1,294 views
0 votes
1 answer

How to merge Year ,Month and date in Order Date in Tableau?

Hi, you can simply drag the Order ...READ MORE

answered Aug 24, 2018 in Tableau by AwesomeSauce
• 860 points
2,328 views
0 votes
0 answers

Row wise difference wrt to total and left quantity.

Hi, i have number of goods to ...READ MORE

May 17, 2019 in Tableau by rahul
287 views
0 votes
1 answer

How to determine average per event by year?

Hi Roshan, Create a new calculated field (use ...READ MORE

answered Sep 25, 2018 in Tableau by Machdata
• 340 points
655 views
0 votes
0 answers

Calculating count average from averages

I've a calculated field in Tableau which ...READ MORE

May 28, 2018 in Tableau by Mahima Choudhary
297 views
0 votes
1 answer
0 votes
1 answer

How to Split a Measure in Tableau?

Have you tried using an IF statement: IF ...READ MORE

answered Aug 14, 2018 in Tableau by AwesomeSauce
• 860 points
1,767 views
0 votes
1 answer

How to get distinct customers this year wrt previous year?

Follow the below steps: 1. Create calculated fields ...READ MORE

answered May 17, 2019 in Tableau by Cherukuri
• 33,030 points
439 views
0 votes
1 answer

Count of negative profit and positive profit for a month

Hi Anitha, It is easy and simple. Follow ...READ MORE

answered May 20, 2019 in Tableau by Cherukuri
• 33,030 points
1,818 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP