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: 
hansdevr
Creator III
Creator III

How to use multiple sums in Set Analysis

Hi Everyone,

I'm working on a dashboard in which a decline/accept percentage on damage claims is calculated.

For one date it's not that hard: sum(Toewijzing) / (sum(Toewijzing) + sum(Afwijzing))

Each record in my table has a 0 / 1 or a 1 / 0 value for these two fields.

Now I want to plot the acceptance percentage in a graph, showing this year and the past 3 years (Y-axis percentage, X-axis months). I want to give it a try using set analysis (to which I'm sort of a newbie), but I wonder how to do this, as multiple sums in one statement are not possible.

Anyone any idea how I should go about this?

1 Solution

Accepted Solutions
hansdevr
Creator III
Creator III
Author

Thnx, Hirish,

I will try this ASAP and report back here!

View solution in original post

10 Replies
Chanty4u
MVP
MVP

sum(Toewijzing) / (sum(Toewijzing) +(Afwijzing))

hansdevr
Creator III
Creator III
Author

shureshqv, thanks, but this is just another way of writing the same thing.. I would like to know how to translate this to a set analysis expression.

santhosh_k_n
Creator II
Creator II

Hi,

U can use as follows

for static values as Sum({<Year={'2016','2015','2014','2013'}>}Toewijzing) [use same set analysis in rest of expressions]

for dynamic year values

set variable V_Year= year(today)-4

      sum({<year={'>=$(=V_Year)'}>}Toewijzing)

Hope this helps

Regards,

SK

hansdevr
Creator III
Creator III
Author

I'm afraid that won't do it, because I want to display the percentage of 'Toewijzing' with regard to the total of 'Toewijzing' + 'Afwijzing' (acceptance and decline).

hansdevr
Creator III
Creator III
Author

I came up with this, which seems to work.  Only thing is, it seems to be ridiculously long and I have the feeling it could be much more simple:

= 100 * (
Sum({1< [Schadecategorie] = P([Schadecategorie]), [Schadesoort] = P([Schadesoort]), [Jaar besluit]={$(vDitJaar)}>}[Toewijzing])

/

(
Sum({1< [Schadecategorie] = P([Schadecategorie]), [Schadesoort] = P([Schadesoort]), [Jaar besluit]={$(vDitJaar)}>}[Toewijzing])

+

Sum({1< [Schadecategorie] = P([Schadecategorie]), [Schadesoort] = P([Schadesoort]), [Jaar besluit]={$(vDitJaar)}>}[Afwijzing])
)
)

HirisH_V7
Master
Master

Hi,

Your Expression can be like this,

sum({<Year={'>=$(=Max(year)-4)'}>}Toewijzing) / (sum({<Year={'>=$(=Max(year)-4)'}>}Toewijzing) +Sum({<Year={'>=$(=Max(year)-4)'}>}Afwijzing))

Hope this helps,

Hirish

HirisH
“Aspire to Inspire before we Expire!”
PradeepReddy
Specialist II
Specialist II

sum({$<Year={'> $(=max(Year)-3)  <= $(=max(Year))'}>}Toewijzing)/(sum({$<Year={'> $(=max(Year)-3)  <= $(=max(Year))'}>}Toewijzing)+sum({$<Year={'> $(=max(Year)-3)  <= $(=max(Year))'}>}Afwijzing))

hansdevr
Creator III
Creator III
Author

Thnx, pradeep,

I will try this ASAP and report back here!

hansdevr
Creator III
Creator III
Author

Thnx, Hirish,

I will try this ASAP and report back here!