Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
oehmemat
Contributor III
Contributor III

Previous month with set expression

Hello Community, I have following Table:

DateValue
28.02.2019325
31.03.2019333
30.04.2019328
31.05.2019326
30.06.2019300
31.07.2019293
31.08.2019292
30.09.2019290
31.10.2019282

 

No I want to make a bar chart with the difference between each month. Eg:

DateDiff
28.02.2019 
31.03.2019

8

30.04.2019-5
31.05.2019-2
30.06.2019-26
31.07.2019-7
31.08.2019-1
30.09.2019-2
31.10.2019-8

 

I can't figure it out how define the set from the month before, something like

 

 

{$<Date ={"$(=monthend(addmonths(Date,-1)))"}>} 

 

 

isn't working as the result aggregates with the Date in the Date column and the set expression returns zero.

Is it even possible with set expression or lies the solution in the script?

 

Labels (4)
1 Solution

Accepted Solutions
zhadrakas
Specialist II
Specialist II

maybe this expression will do it:

 

sum(Value) - above(sum(Value))

 

regards

tim 

View solution in original post

3 Replies
zhadrakas
Specialist II
Specialist II

maybe this expression will do it:

 

sum(Value) - above(sum(Value))

 

regards

tim 

jaibau1993
Partner - Creator III
Partner - Creator III

Hi! Set analysis is evaluated once per chart. This means that you can't build a "row-wise set analysis" expression but it is what you need: for month (row) you have to calculate the difference with respect to the previous month. Said so, the solution may be similar to the one provided by Zhadrakas

Regards,

Jaime.

oehmemat
Contributor III
Contributor III
Author

Thank you very much, the above(function) did the trick.