Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hey all ,
i am creating a bar chart with a dimenssion of Month ,
i need to calculate a sum of amount on each month for 2 years obviously will show two bar next to each other in a single month..
Is it possibel to add one last bar calculating YTD ?
Thank you hope you can help.
Try to share a sample data set(may be in excel) explaining the expected output there.
Month | Year | Sum of Amount |
Jan | 2015 | 1000 |
Feb | 2015 | 1500 |
Mar | 2015 | 2000 |
Apr | 2015 | 2500 |
May | 2015 | 3000 |
Jun | 2015 | 4500 |
July | 2015 | 5200 |
Aug | 2015 | 2500 |
Sep | 2015 | 1500 |
Jan | 2014 | 1200 |
Feb | 2014 | 1700 |
Mar | 2014 | 2500 |
Apr | 2014 | 3000 |
May | 2014 | 3200 |
Jun | 2014 | 4700 |
July | 2014 | 5500 |
Aug | 2014 | 2800 |
Sep | 2014 | 1600 |
Oct | 2014 | 2500 |
Nov | 2014 | 3000 |
Dec | 2014 | 4500 |
YTD 2015 | YTD 2014 | |
23700 | 26200 | (as till Sep2014) |
need to show these in a bar Chart
PFA...
hi nagarjuna.kothamandi Thanks for you reply but this will give to total of all the 2014 year
my requirment is to see the sum of in 2014 in the same period of time as this year
for example if we are in sep-2015 when showing total as u showed me i need to see 2 bar :
One for the sum of amount till Sep-2015 (YTD)
and the second fro 2014 on is to show it as sum of amount till (sep-2014) to compare the same period of time
May be like attached?
Input:
LOAD Month,
Year,
MakeDate(Year, Month(Date#(Month, 'MMM'))) as Date,
Amt
INLINE [
Month,Year, Amt
Jan,2015,1000
Feb,2015,1500
Mar,2015,2000
Apr,2015,2500
May,2015,3000
Jun,2015,4500
July,2015,5200
Aug,2015,2500
Sep,2015,1500
Jan,2014,1200
Feb,2014,1700
Mar,2014,2500
Apr,2014,3000
May,2014,3200
Jun,2014,4700
July,2014,5500
Aug,2014,2800
Sep,2014,1600
Oct,2014,2500
Nov,2014,3000
Dec,2014,4500
];
NoConcatenate
Output:
Load
Date,
Month,
Year,
Sum(Amt) as Amount
Resident Input group by Date, Year, Month Order By Date;
Drop Table Input;
Concatenate
Load Distinct
'YTD' as Month,
Year
Resident Output
Current Year Exp:
If(Month='YTD',RangeSum(Above(Sum({<Year={"$(=Year(Today()))"}>}Amount),12-Month(Today())+1,$(vCurrMonth))),Sum({<Year={"$(=Year(Today()))"}>}Amount))
Last Year Exp:
If(Month='YTD',RangeSum(Above(Sum({<Year={"$(=Year(Today())-1)"}>}Amount),12-Month(Today())+1,$(vCurrMonth))),Sum({<Year={"$(=Year(Today())-1)"}>}Amount))