Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
arethaking
Creator II
Creator II

Calculate value of a month

Hi All,

I have the data on month level until July for 3 Products.

I want to show the default current month ,current year sales  value. If sales value is zero need to show the previuos month value.

There are no sales values in Sep,Aug but I want to show value 22 which is July month.

So Sep,Aug sales values should be 22.

How to achieve this?

5 Replies
raju_insights
Partner - Creator III
Partner - Creator III

Hi Aretha,

You requirement is confusing from your application.

You have 3 products P1, P2, P3. Product P1's Jul value is 22. No products are assigned to Aug, Sep, Oct, Nov, Dec. It is not logically convincing to fill the 22 for Aug, Sep, Oct, Nov, Dec...

I mean on what basis 22 has to be filled ??? And why not 32 and 17....!!!

arethaking
Creator II
Creator II
Author

Now we are in Sept month. I want to show the data until current month. If I select Sept , as no data for that month, so that I want to show July Data.

raju_insights
Partner - Creator III
Partner - Creator III

Hi Aretha,

I have done some changes in script.

PFA.

tresesco
MVP
MVP

Try like:

=Sum({<Date={'$(vMaxDataDate)'}>} Sales)

Where variable

vMaxDataDate =Date(max({<Sales={"=Sum(Sales)>0"}>}Date),'MMM-YY')


PFA


tamilarasu
Champion
Champion

Hi,

Have a look at the attachment.