
1. Re: Calculated Field If Function
karthik.shravanam Jun 12, 2017 7:24 AM (in response to Pax Gray)EX:
If [Profit] > 0 Then [Profit]/[Total]
END

2. Re: Calculated Field If Function
Madhusudhan Khambham Jun 12, 2017 7:38 AM (in response to Pax Gray)1 of 1 people found this helpfulHi Pax Gray,
You cannot do the percent of total for a Dimension field. It will be possible only on the measures.
Syntax for calculating the percent of Total: Sum(Measure)/total(sum(measure))
Example:
If you have a dimension like Product Name and the measure say Sales. If you would like to calculate the Percent of total for the Product Apple then you can write your calculation like this.
If ATTR( [Product Name]) = 'Apple' then
Sum(Sales)/total(sum(sales)) End
Please let us know, in case you have any further questions.
Thanks & Regards
Madhu K

3. Re: Calculated Field If Function
Pax Gray Jun 12, 2017 10:20 AM (in response to Madhusudhan Khambham)I think we almost have it, I'll explain it a little more to see if we can get it right. So I have a dimension and it can be either 'positive' or 'negative'. And I would for it to go something along the lines of: If it is 'positive', then I want to divide the number of 'positive' records by the total number of records. Not sure if this can be done at all now or not. Any ideas?