Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to base a measure with set analysis criteria off another measure that has a different set analysis criteria. Here's the measure (Policy Count) I want to base it on. I don't want the measure(Policy Count) created in the script.
Policy Count
count({<RecType={'Current'},[Counting Policy]={"=sum(cumulative_UEP)>0"}>}distinct [Counting Policy])
Below is the measure I'm trying to create.
Client Count
count({<RecType={'Current'},[Client No]={"=sum([Policy Count])>0"}>}distinct [Client No])
Any ideas on how I could accomplish that?
Just this
Client Count
count({<RecType={'Current'}, [Client No]={"=sum(cumulative_UEP)>0"} >}distinct [Client No])
Or
count({<RecType={'Current'}, [Counting Policy]={"=sum(cumulative_UEP)>0"} >}distinct [Client No])
by definition, PolicyCount = any policy that has sum(cumulative_UEP)>0
so ClientCount = Client with PolicyCount > 0
; which in turn also means clients with sum(cumulative_UEP)>0 !!!
There is a slight problem here:- you cannot use cumulative measure without aggregating.
Your Policy Count is Already a count function thus you cannot use sum on it.
First Try this:-
count({<RecType={'Current'},[Client No]={"=(([Policy Count])>0)"}>}distinct [Client No])
(Please Try to replace this with expression of meaure or variable and not Master measure)
If that doesnt work, create a new measure by aggregrating policy count on Client No and then using sum like:-
NewM = aggr([Policy Count],[Client No])
count({<RecType={'Current'},[Client No]={"=(Sum(NewM)>0)"}>}distinct [Client No])
(Same as above use as Complete expression or use Variable)
If both of these doesnt work please share sample data and sample output and explain using those two.
Thanks for the reply this doesn't solve my issue. I'm trying an alternative that I believe will work for me. I just need to test it out. If it works I'll post it. Thanks again.
Make the policy count a master item and use this masteritem in your expression
count({<RecType={'Current'},[Client No]={"=[Policy Count]>0"}>}distinct [Client No])
Try this
SET vPolicyCount = count({<RecType={'Current'},[Counting Policy]={"=sum(cumulative_UEP)>0"}>}distinct [Counting Policy]);
Client Count
count({<RecType={'Current'},[Client No]={"=$(vPolicyCount)>0"}>}distinct [Client No]
)
Just this
Client Count
count({<RecType={'Current'}, [Client No]={"=sum(cumulative_UEP)>0"} >}distinct [Client No])
Or
count({<RecType={'Current'}, [Counting Policy]={"=sum(cumulative_UEP)>0"} >}distinct [Client No])
by definition, PolicyCount = any policy that has sum(cumulative_UEP)>0
so ClientCount = Client with PolicyCount > 0
; which in turn also means clients with sum(cumulative_UEP)>0 !!!
Create a variable to store policy count output. and use this variable in client count expression
=count({<RecType={'Current'},[Client No]={'$(=$(vPolicyCount))>0'}>}distinct [Client No])
Regards,
Aditya