Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am having one intresting problem in set analysis expression,
where i am using condition like my Doc Recived Date should be greater than selected month ????
expression is like this ..
Count({$<YM={'$(vCurrentyearmonth)'},STATUS={'Deferred'},Year=,Quarter=,MonthName=>} distinct BTFILE_NO)
here i want to insert one more condition using greater than sign for date like if my( RMONTH > MONTHNAME ) THEN COUNT FUNCTION SHOULD WORK.....
Any Guess......
PLEASE FIND OUT THE APPLICATION ATTACHED FOR YOUR REFRENCE AND UNDERSTANDING.........
Please reply ASAP..... AS THIS IS VERY URGENT....
Regards,
Dushyant
I suggest you study the example below
http://community.qlik.com/media/p/82604.aspx
best regards,
fernando
Fernando,
I dont think that doccument will help because i need to use greater than sign (FOR DATE COMPARISON) at expression level....
Regards,
Dushyant
Dushyant
Something like this, perhaps:
Count({$<YM={'$(vCurrentyearmonth)'},STATUS={'Deferred'},Year=,Quarter=,MonthName=,RMONTH={">$(MONTHNAME)"}>} distinct BTFILE_NO)
... assuming that RMONTH is a field and MONTHNAME isa variable, and that RMONTH and MONTHNAME have the same textual format (if they are dates).
This won't work if MONTHNAME is a field - you need a unique value. This could be something like Min(MONTHNAME), as in ....
....,RMONTH={">$(=Date(Min(MONTHNAME)))"}... (again assuming RMONTH is a date in the default format).
Although I have to ask why you would want to do a > comparison on month name?
Hope this helps
Jonathan
You can use greater than like:
sum({$<Year={">2000"}>}
However, I think this won't work for a text value, you'd need to create another field in your script that puts the months into numerical order, so you could have for example:
Count({$<RmonthNumeric={">7"},YM={'$(vCurrentyearmonth)'},STATUS={'Deferred'},Year=,Quarter=,MonthName=>} distinct BTFILE_NO)
Hope it works out for you.
Dominic
Well Thanx John,
But Can you have a look at document i attached with my post.You can see my script their and apply at my expression.I think u need to work a bit more on my document.
can you send me my modified document along with those changes u have made ....
Thanx in advance....
Waiting for your reply.....
Dominic,
Thanks for your prompt respose ,
I think you hit on the right spot but my desired result is still pending.
Can you have a look at my document attached with my post.You can see my script their and apply at my expression.I think u need to work a bit more on my document.
can you send me my modified document along with those changes u have made ....
Thanx in advance....
Waiting for your reply.....
Regards,
Dushyant
Dushyant
In your script you could maybe use a map load to apply a sequence to the month names like:
Obviously you need to amend this to match your table name, month names etc.<table><tbody><tr><td>Map_Classification:
</td></tr><tr><td>
</td><td>MAPPING
</td></tr><tr><td>
</td><td>LOAD
* INLINE [
</td></tr><tr><td>
</td><td>
RMonth, MthNumeric
</td></tr><tr><td>
</td><td>
Jan, 1
</td></tr><tr><td>
</td><td>
Feb, 2
</td></tr><tr><td>
</td><td>
Mar, 3
</td></tr><tr><td>
</td><td>
Apr, 4
</td></tr><tr><td>
</td><td>];
</td></tr><tr><td>
</td><td> </td></tr><tr><td>
</td><td>
//Load FirstTable
</td></tr><tr><td>
</td><td>SecondTable:
</td></tr><tr><td>
</td><td>Load
</td></tr><tr><td>
</td><td>
Rmonth,
</td></tr><tr><td>
</td><td>
// Use the applymap to classify the RMonth, 999 is the default-value
</td></tr><tr><td>
</td><td>
// if the applymap does not find a match
</td></tr><tr><td>
</td><td>
applymap(
'Map_Classification'
,RMonth,999)
as RMonthNumeric
</td></tr><tr><td>
</td><td>RESIDENT
FirstTable;
</td></tr></tbody></table>
Dominice,
Can you apply these changes to my script and send me back..because i dont know how to use apply map function.
Thanks in advance......
Waiting for your apply.....
Regards,
Dushyant