Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
tracycrown
Creator III
Creator III

Growth Rate

Dear all

Can someone help to explain why following script does not work in expression ?

   

Type2012201320142015
Sales1000150012002200
50%-20%83%

(sum(if(Type='Sales',Data))-Before(sum(if(Type='Sales',Data))))/Before(sum(if(Type='Sales',Data)))

Thank you

Tracy

4 Replies
sinanozdemir
Specialist III
Specialist III

Hi Tracy,

I tried to mimic your data-set, the if statement works for me. Maybe you have extra space in the type field so try trim() function.

Sum(If(Trim(Type) = 'Sales', Data)) and here is my expression:

Capture.PNG

If that doesn't work, try set analysis with Sum({<Type={'Sales'}>} Data).

Hope this helps.

tracycrown
Creator III
Creator III
Author

Dear Sinan Ozdemir

I can compute the % but nothing shown on the chart, please advise.

Thank you

Tracy

krishna20
Specialist II
Specialist II

Hi,

Here is your output. Pls find the attached doc.

Comm_.png

Edited by : Krishna

bimala0507
Partner - Creator
Partner - Creator

Hi:

Before function works only in Pivot table not any other chart. To see the value replace before with above.

Kind Regards,

Bimala