Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis - correct total

I have the following expression in a pivot chart to calculate Current Year Premium based on the Previous Year Premium being nil. This works on a line by line basis, but the totals still include those figure where the prior year premiums are nil. Any idea how to overcome this?

IF

([Prior Yr Premium]=0, 0,
sum(aggr((if(sum( {$<coveryear = {
$(#vLastmonthyearB)}, ptrantype = {'R', 'N'},
inscode = {'RS17','TW01'}, %BusinessClassLink = {'20.22.','23.22.','52.22.'}>} netprem) <= 0, '0',
sum( {$<coveryear = {
$(#vLastmonthyearB)}, ptrantype = {'R', 'N'},
inscode = {'RS17','TW01'}, %BusinessClassLink = {'20.22.','23.22.','52.22.'}>} netprem))),clntcode,covermonth)))

Thanks,

Jayne

4 Replies
Not applicable
Author

Hi Jayne,

If I understand this correctly, your problem is with the test of "[Prior Yr Premium]=0"
failing. I would start by reducing your expression to something like

If ([Prior Yr Premium]=0, 0,999999)


This will prove that the test is working, and this would avoid the need to debug the other four lines, which look a little fearsome.

Good luck,

John

Not applicable
Author

Hi,

Can you give us sample QVW or source?

I had the same need last year and I used Dimensionality() to manipulate my Total

Regards,

Alex

Not applicable
Author

Thanks both.

Alex, I'm not really sure what you need from me?

Thanks,

Jayne

Not applicable
Author

Well as I said a sample application (qvw) OR a sample source (excel or you can list an inline table here) OR the result table you want (where I can see the dimensions).

If you don't have any then that's okay. I can't explain it without showing a sample. Sorry