Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

current Month vs Previous Month

Hi,

I've attached an app. See Sheet 1

In table Current vs Previous, I want to show the Sum of Values for the current month in one column and the Sum of Value for previous Month in another column.

Showing only the month in column 2 and 3, I can show current month and its previous month, but when it comes to the Sum of values, I can't show the correct values.

Probably something wrong in my set analysis expression

Can you please help me?

This is what I want to achieve:

correcttable.png

Thanks in advance.

Sílvia

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

Try

Dimension:

MonthYear

Expressions:

Current Month

Sum(Value)

PreviousMonth

Above(Sum(Value))

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

6 Replies
vinieme12
Champion III
Champion III

Try

Dimension:

MonthYear

Expressions:

Current Month

Sum(Value)

PreviousMonth

Above(Sum(Value))

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anil_Babu_Samineni

I've used for Max MonthYear

Sum({<MonthYear = {"$(=Max(MonthYear))"}>}Value)

And Previous MonthYear i used this

Sum({<MonthYear = {"$(=Date(Max(MonthYear)-1,'MMM-YYYY'))"}>}Value)

Image looks like this, Is this you are expecting to see

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

Thanks Vineeth, it works

By the way, If I add a column that corresponds to the difference between the two values:

CurrentMonth - PreviousMonth: Sum(Value) - Above(Sum(Value))

If I create a line char with only this new calcultaion it works too.

This Above() function, can  it be used in all types of charts?

Regards,

Sílvia

vinieme12
Champion III
Champion III

Yes, you can but it can be tricky at times to make it work.

Here is another application of above() with Rangesum(), for accumulation of values

Accumulative Sums

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable
Author

Ok.

Another question:

I want that regardless the selection I made in MonthYear, it always shows all values.

I mean keep the table static, regardless all dimensions that are associated with dates.

I only need to add that to the set analysis ?

Like MonthYear=, Year=, Date=... Like this ?.

vinieme12
Champion III
Champion III

correct, should work

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.