3 Replies Latest reply on Jan 18, 2014 1:29 AM by sabiha mahboob

# Please help me to edit this calculation....cam

if attr([Facility/Non Facility])='Sum' then sum([Achieved Number]) else sum([Achieved Number] )/3 end

I want to edit above formula, saying  that if sum([Achieved Number])=cons then take the last month values out of three months. eg if there are 3 months july, august and sept and if sum([Achieved Number])= const then take value of sept....

Is it possible...

Thanks

Sabiha

• ###### 1. Re: Please help me to edit this calculation....cam

I have tried below, but 'Cons' function is not working...:-(

if attr([Facility/Non Facility])='Sum' then sum([Achieved Number])

ELSEIF attr([Facility/Non Facility])='Cons' then MAX([Achieved Number])

ELSE sum([Achieved Number] )/3

end

• ###### 2. Re: Please help me to edit this calculation....cam

Hi Sabiha,

The calculation can be edited to be similar to the following:

if attr([Facility/Non Facility])='Sum' then sum([Achieved Number])

ELSEIF attr([Facility/Non Facility])='Cons' and datepart('month', max([Order Date]))=window_max(datepart('month', max([Order Date]))) then MAX([Achieved Number])

ELSE sum([Achieved Number] )/3

end

Hope this helps!

-Tracy

• ###### 3. Re: Please help me to edit this calculation....cam

Dear Tracy,

Thank you so much for writing me back, but its not working :-(.

I have arranged my data in quarter view in the form of table.My requirement is when i look that dashboard it should follow all the three criteria of sum, average and const, but in the next dashboard the same data is in bar charts and that's aggregated to year wise so there i want sum for 12 months for few achieved numbers and for few achieved number max figure out of the 12 months and for few divides by 12(where it divided by 3 in previous quarter wise table).

Any suggestion?

Thanks

Sabiha