
Re: Calculated dimension based on a value of one of the cells
Andrea Gigliotti Nov 24, 2017 6:43 AM (in response to Leszek Piekielniak)you can use the below expression in your measure:
Sum( if( ChgPost = 0, ChgOut, ChgPost ) )
OR
create a new field within your script as below:
LOAD
...
if( ChgPost = 0, ChgOut, ChgPost ) as Calculated
and use Sum(Calculated) as your measure.

Re: Calculated dimension based on a value of one of the cells
Leszek Piekielniak Nov 24, 2017 7:00 AM (in response to Andrea Gigliotti )HI Andrea,
thank you, I used the expression Sum( if( ChgPost = 0, ChgOut, ChgPost ) ) but the result looks like Calculated = ChgOut + ChgPost
Which is not what I wanted.

Re: Calculated dimension based on a value of one of the cells
Andrea Gigliotti Nov 24, 2017 7:11 AM (in response to Leszek Piekielniak)for the row with 1500 in both fields value, you'll get 1500 as result not 3000 applying the above expression.

Re: Calculated dimension based on a value of one of the cells
Leszek Piekielniak Nov 24, 2017 7:35 AM (in response to Andrea Gigliotti )that what I expected to see. i.e. calculated value to be 1500 but I get 3000?


Re: Calculated dimension based on a value of one of the cells
Leszek Piekielniak Nov 24, 2017 7:52 AM (in response to Leszek Piekielniak)I realised where the mistake is, I changed the expression to
if( Sum(ChgPost) = 0, Sum(ChgOut), Sum(ChgPost))
and it worked as I am looking at Sum of ChgPost not ChrgPost itself. Thank you for your help!




