I've been fighting with calculate for awhile (and losing!). The pattern i'm trying to solve is something common to almost every measure I would write.
I need to sum Premium for insurance policies for a selected time period.
the policies have multiple endorsements that caould be in effect for the time period.
I need only the maximum endorsement for a period.
the measure (or measures) will need to roll up to the account and business.
example:
time period january and february 2010
policy endorse effdate trans amt Premium
513 0 2010-01-01 422491.00 422491
513 1 2010-01-01 801.00 423292
513 2 2010-01-01 0.00 423292
513 3 2010-02-27 -799.00 422493
513 4 2010-03-11 628.00 423121
so for the policy above endorsement 3 is the max for the jan feb 2010 timeperiod and the premium is 422493
I've tried qite a few ways to do this and some even worked but were very slow
i think i need to create a measure with calculate to get the max endorsement for the period
then use sumx with that measure filtering the policies, i did get a variation of that to almost work but I couldn't get a distinct list of policies, it calculated for each policy and endorsement. If anyone can give me some suggestions i'd really apprecieate it, I'm about ready to give up on this working for us.
here is a link to a blank pivot with sample data:
http://sdrv.ms/Q7Us3U
Thanks
Scott
I need to sum Premium for insurance policies for a selected time period.
the policies have multiple endorsements that caould be in effect for the time period.
I need only the maximum endorsement for a period.
the measure (or measures) will need to roll up to the account and business.
example:
time period january and february 2010
policy endorse effdate trans amt Premium
513 0 2010-01-01 422491.00 422491
513 1 2010-01-01 801.00 423292
513 2 2010-01-01 0.00 423292
513 3 2010-02-27 -799.00 422493
513 4 2010-03-11 628.00 423121
so for the policy above endorsement 3 is the max for the jan feb 2010 timeperiod and the premium is 422493
I've tried qite a few ways to do this and some even worked but were very slow
i think i need to create a measure with calculate to get the max endorsement for the period
then use sumx with that measure filtering the policies, i did get a variation of that to almost work but I couldn't get a distinct list of policies, it calculated for each policy and endorsement. If anyone can give me some suggestions i'd really apprecieate it, I'm about ready to give up on this working for us.
here is a link to a blank pivot with sample data:
http://sdrv.ms/Q7Us3U
Thanks
Scott