Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression for set analysis!

Hi,

Can anybody help here with the following expression in the chart.

If Tax amount is 0 then 0 else We need to add 2 dimensions (CustomsValue+DutyValue) * 20%

I Tried following below, But i do not get any error , But also data is not getting calculated or displayed,

sum({$<TaxAmount={0} >}0,(CustomsValue+DutyValue)*0.20)).

Please help here

1 Solution

Accepted Solutions
Not applicable
Author

Hi Sweuhl,

Thanks it works.

Hi micheal,

Thanks for your answer also. Iam trying to completely not use IF statement as it hinderes the performance completely,

Ben

View solution in original post

3 Replies
agilos_mla
Partner - Creator III
Partner - Creator III

You don't need specially a set analysis here, you could use a simple if, moreover if you want a 0 instead of a null in the chart :


=if(TaxAmount=0, 0, sum(CustomsValue+DutyValue)*0.20)


otherwise try


=sum({$<TaxAmount={"=0"} >} CustomsValue+DutyValue)*0.20


and force replace null by 0 in the presentation tab of the chart.


Michael

swuehl
MVP
MVP

I assume you want to aggregate across several rows, where TaxAmount may be not unambiguous and need to be evaluated per row. So you need to include your condition in an aggregation function, not the other way round:

=sum( if(TaxAmount <> 0, rangesum(CustomsValue,DutyValue) ) * 0.20

Not applicable
Author

Hi Sweuhl,

Thanks it works.

Hi micheal,

Thanks for your answer also. Iam trying to completely not use IF statement as it hinderes the performance completely,

Ben