Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have 4 measure calculations
i need to divided by column(3) expression divide by column(2) to calculate.
need to display the values based on range.range values in script i stored in variable and using in table.
set vRangeTest = '<= $5M',
'> $5M and <= $10M',
'> $10M and <= $15M',
'> $15M and <= $20M';
i need to get column(3) total value divide by column(2) total value in Rate total
locationpremimun/TIv
i dont want sum for Rate totals
Expected resulst:0.0158699
To perform the calculation of column(3) divided by column(2) and display the results based on a range, you can use a combination of the if() and aggr() functions.
Here's an example of how you can do this:
=if(aggr(sum(column(3))/sum(column(2)), Location) $(vRangeTest) as 'Rate total'
This will divide the total value of column(3) by the total value of column(2) for each value of Location, and then display the result based on the range specified in the variable vRangeTest.
Note that, the result will be summed across all the location, if you do not want the sum of Rate totals, you can use the above expression in the table level and not in the total level. Also, you might need to adjust the script to match your specific requirements. Please let me know if you have any other question.