Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

Using Greater Than in Set Analysis

I am trying to use the following : Count ({<CampCreateDate {">= [Document Date]"}>} DISTINCT Contract_ID), but keep getting an error.  I want to count any contract where campaign create date is greater than or equal to document date.

Thanks
Thom

15 Replies
etay_netintent
Partner - Contributor III
Partner - Contributor III

Hi

Set analysis only recognised '=' there fore you have to use ='<='

Look at this example from the help

Sum({<Year = {">=1978"}> } Sales)

Etay

etay_netintent
Partner - Contributor III
Partner - Contributor III

Hi

for starters Try CampCreateDate = {

Which version are you working with ?? in addition to adding the = Set analysis had a problem comparing dates. We turn the date into a number and compare on that.

Etay

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Check with this

    

Count ({<CampCreateDate {"=Aggr(If(CampCreateDate >=[Document Date],CampCreateDate), CampCreateDate)"}>}DISTINCT Contract_ID)

Celambarasan

tmumaw
Specialist II
Specialist II
Author

Set modifier error

tmumaw
Specialist II
Specialist II
Author

We are running 10 SR 4

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     typo mistake

    

Count ({<CampCreateDate ={"=Aggr(If(CampCreateDate >=[Document Date],CampCreateDate), CampCreateDate)"}>}DISTINCT Contract_ID)

Or check with this also

Count ({<CampCreateDate ={"=Aggr(If(CampCreateDate >=[Document Date],CampCreateDate), CampCreateDate,[Document Date])"}>}DISTINCT Contract_ID)

Celambarasan

danielrozental
Master II
Master II

Sorry but set analysis won't work for that. Reason is it's not processed as row per row basis, the set analysis result set is one and gets processed before the object does.

You need to do something like this or you can just add a flag in the script for those documents

Count (DISTINCT if(CampCreateDate >= [Document Date],Contract_ID))

Not applicable

Hi Thom!!

Are you still interested for solution?

I didn't recognize the post date!!!

However this expression works properly:

Supposing your pivot table has a structure like this:

Contract_ID - CampCreateDate - Document Date

the right expression is:

count ({< CampCreateDate= {'>=$(=date(max(aggr(max([Document Date]),Contract_ID&CampCreateDate&[Document Date])),'DD/MM/YYYY'))'} >} DISTINCT Contract_ID)  

If you have problem I can send you my sample Qvw!

Let me know...

Bye!!

SunilChauhan
Champion
Champion


simply use below code


Count ({<CampCreateDate= {">=$(= [Document Date])"}>} DISTINCT Contract_ID)


hope this helps

Sunil Chauhan