3 Replies Latest reply on Jul 3, 2016 5:54 AM by Shinichiro Murakami

# How calculate the sum of first two months and not the total period?

Hi there I have follow challenge:

I would like to show the sum for blue and red area separetely, i.e. in the first row: 10101 shoulld stay the sum: 13

in the row 10201 should stay in the red area 5 and in the blue area 16

With this graphic I want to show how many new items we got last month, thats why I coloured months April and May to blue and June to red.

Does anybode have ideas, how can I show numbers separtely for months "April, May" (as a group) and June

Dilyana

• ###### 1. Re: How calculate the sum of first two months and not the total period?

It's easy to set different category as "June" and "April,May" as color, but one thing.

Because you have two data source, below calculated filed needs to be added on secondary data source.

[Category]

if month([Date])=6 then "June"

elseif month([Date])=5 or month([Date])=4 then "April, May"

end

Then, put this category from secondary data source into VIZ.

Then, change the color as you like.

Thanks,

Shin

1 of 1 people found this helpful
• ###### 2. Re: How calculate the sum of first two months and not the total period?

It works!

• ###### 3. Re: How calculate the sum of first two months and not the total period?

You are welcome.

And could you mark my answer as "correct"?

Thanks,

Shin