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

Set analysis in load script

Hey guys,

I'm trying to look at the increase in Annual Fees between two years by calculating it in the load script. I want to do it in the load script because I need to do set analysis on it as well.

I have a field named 'Annual_Fee' and a field 'Fee_Fiscal_Year' and basically I'm trying to seperate the 2014/2015 and 2013/2014 years and calculate the difference.

I'm trying to do this in the load script:

Sum({$<Fee_Fiscal_Year = {'2014/2015'}>}Annual_Fee) - Sum({<Fee_Fiscal_Year = {'2013/2014'}>}Annual_Fee) as "Increase $"

But it's not working because of the curly brackets. Do you guys know how I can get around this?

5 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

It is not permitted to use Set Analysis in the script, set analysis can be used in front end only.  To achieve this you can try it in a different way.

Can you attach some sample data?

Regards,

jagan.


ToniKautto
Employee
Employee

Some loose thoughts are that you might be able to resolve this by using Group By in load statements in combination with joins. The correct answer depends on your data structure, so a simple sample QVW would be required to answer your question.

Anonymous
Not applicable
Author

Hi ,

you can't use set analysis in script,u can do it in only in front end

Anonymous
Not applicable
Author


Hi James,


Try this

(if(Fee_Fiscal_Year = '2014/2015', Sum(Annual_Fee)) -if(Fee_Fiscal_Year = '2013/2014', Sum(Annual_Fee)) as "Increase $"

Fee_Fiscal_Year  but Fiscal year is single field

it can not have 2014/2015 and 2013/2014 for the same row

This will not work for sure but this is the if else analysis conversion of your set analysis


it would be better if you can share sample application to understand data model

Not applicable
Author

Hey guys, thanks for the response!

Unfortunately I can't share the app, but I've decided to just leave the expression in the app anyway. It's only a matter of copy&pasting anyway so no big deal.