Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi team,
I need help on how to accumulate all previous years to show into one bar and current year in another next bar, in a bar graph.
Thanks,
Raj
Hi Raj,
In the load script you can calculate a new field. For purpose of this answer let's name it "IsCurrentYear". This field will classify each record as current year or previous years. It will do the classification based on simple If statement. Sth like this:
If (Year(date)=Year(Today()), 'CurrentYear', 'PreviousYears') as IsCurrentYear
Then in your bar chart you can use this new field as a chart dimension.
Let me know if this was helpful,
Arek
Hi Raj,
In the load script you can calculate a new field. For purpose of this answer let's name it "IsCurrentYear". This field will classify each record as current year or previous years. It will do the classification based on simple If statement. Sth like this:
If (Year(date)=Year(Today()), 'CurrentYear', 'PreviousYears') as IsCurrentYear
Then in your bar chart you can use this new field as a chart dimension.
Let me know if this was helpful,
Arek
Thanks Arek!!
Hi Arek,
How can we show the first bar as previous year cumulative value and next bar need to show all the month of the current year bar.
Regards,
Raj
I would suggest to slightly modify the previous formula using nested If statement:
If(Year(date)=Year(Today()), 'CurrentYear',
If(Year(date)=Year(Today())-1, 'PreviousYear', 'Other' ))
Then Years other than Current and Previous will be classified as 'Other'
Hope it helps