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: 
neetu_singh
Partner - Creator III
Partner - Creator III

Need Help on Set Analysis- date comparison without using variable

Dear All,

I need your help in Set Analysis, as mention below m using the expression to calculate member count on the basis of date comparison, the syntax which i am using:

exps.jpg

this expression is working fine if i select single month, but not working when i use month as a dimension as when i use month as dimension above mention "monthend or monthstart" expression takes only one value i.e. for jan start & end date. Because of this in my output reports it gives the value for jan in all rest of the month as mention below & highlighted in red, the value 128 is for jan only but its coming in all month:exps.jpg

12 Replies
vikasmahajan

Can you try pls

Count( Aggr( formula , Dimension))

where dimensions will be Months.

Regards

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
sanketkhunte
Creator II
Creator II

Can you try same expression by using '1' instead of '$' ?

tresesco
MVP
MVP

try something like:

Count ( <Your set analysis> Distinct Total <MonthField> MEM_USERID)

neetu_singh
Partner - Creator III
Partner - Creator III
Author

Hello Tresesco,

What do you mean by Total <MonthField>

Can you explain..

tresesco
MVP
MVP

Hi,


Total <MonthField> would disregard your month dimension which is there in your chart. For better understanding, have a look at the attached sample. Hope that helps you understand.

neetu_singh
Partner - Creator III
Partner - Creator III
Author

exps.jpg

This doesnt work, Please chk & let me know

tresesco
MVP
MVP

Another point just noticed.

While you are using min()/max() functions, the similar set analysis has to be included there too, I guess. Could you please share example app with sample data?

shadoworth
Partner - Contributor
Partner - Contributor

You should use the " instead of ' when using set analysis with >=< sign.

For example you should write

ENG_ACTDATE={">=$(=MonthStart(Min(COMMON_DATE)))"}

instead of

ENG_ACTDATE={'>=$(=MonthStart(Min(COMMON_DATE)))'}

Try this to solve your problem. If this doesn't I will check the rest of the formula.

neetu_singh
Partner - Creator III
Partner - Creator III
Author

Hi Tresesco,

please find the attached sample data with qvw. in a straight table there are two expression one is with Set Analysis & second one is with If Condition the output using if condition is correct and i want the same with set analysis.