Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
FelipeK16
Contributor III
Contributor III

HELP! Set analysis Measure

Hello friends, I am dealing with an issue, and I request help, 

I built a measure to show a count distinct of users filtered by some columns, but I need to use a conditional for Dates, I have already the conditional for the dates working fine in a fact table, but I need to introduce it on the formula measure, I just can't see how, 

Initially I have added a similar condition (I thought it worked) but is not working:

The formula measure is:

1. Count( distinct {<[GSDP.termstartdate_vp.autoCalendar.Year],[GSDP.termstartdate_vp.autoCalendar.Month],
CRM.servicetype={'Optional'},CRM.I_CMPGN={'9098'},CRM.contact_date ={"<=$(Date(Max(CRM.termstartdate)))"} >} VIN_)

The conditional of the fact table is

2. =if(CRM.contact_date=aggr(max(if(CRM.contact_date <= CRM.termstartdate,CRM.contact_date)),VIN_),CRM.OFFER_VERSION_DESC1)

the VIN_ is the ID User, 

I have tried this in order to match the two formulas, due to I thought that the condition CRM.contact_date ={"<=$(Date(Max(CRM.termstartdate)))"} from the 1. formula can potencially make what the 2. is doing, knowing that is not, I need to introduce #2. on#1.

The formula I built and didn't work is:

3. Count( distinct {<[GSDP.termstartdate_vp.autoCalendar.Year],[GSDP.termstartdate_vp.autoCalendar.Month],
CRM.servicetype={'Optional'},CRM.I_CMPGN={'9098'},CRM.contact_date <= CRM.termstartdate,CRM.contact_date>} VIN_)

 

Labels (4)
0 Replies