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

Calculate Result In If Statements Problem

Hi All,

I am having problem with calculating result from two expressions in the if statement. Please help!!

Here is what I have:

The count_intervals is calculated by orange expression. Now, I need to take the total sum (12) of this count_intervals divide it by 18 for each % Core Intervals Met SL Goal where count_intervals equals 1.

This expression does not return correct result as you can see in the picture below.

if((Sum (met_core_sl))/(Sum (answered_call))>.8, (sum(total(if((Sum (met_core_sl)/Sum (answered_call))>.8, 1,0))))/18,0)

Untitled.png

If I replace the orange expression with below, it returns all zeros instead of dashes.

if((Sum (met_core_sl))/(Sum (answered_call))>.8, sum(total(count_intervals))/18,0)

Thank you for your input everyone.

2 Replies
swuehl
MVP
MVP

I think you need advanced aggregation here to embed your Sum() aggregations into another Sum() aggregation.

Look into advanced aggregation examples into the help, like 'Sum of rows in pivot tables' (even if you are not using a pivot table).

You are not showing full information about your chart, like the dimensions used (it's in general much easier to help if you post a small sample qvw). I am assuming a single dimension called Dim1. Then your expression might look like

if((Sum (met_core_sl))/(Sum (answered_call))>.8,

Sum(total aggr( if((Sum (met_core_sl)/Sum (answered_call))>.8, 1,0) , Dim1 )) /18


,0)

Not applicable
Author

Thanks Swuehl! That's what I want.