Topic: Drill to weekday?
Drill to weekday?
Can I somehow enable drill to detail in the weekday distribution?
And a suggestion: Would be nice with a similar month distritbution
And a suggestion: Would be nice with a similar month distritbution
Hi franklin,
Sorry, currently it's not possible to drill down in the weekday distribution. But I think you're right, we should definately add that, so I will add a ticket for it for the next release.
Doing a month distribution should also be possible, yes. Actually it also IS possible, if you don't mind applying a small trick.
Select a date column, eg. the "ORDERFACT.REQUIREDDATE" column from the order db.
Add a Javascript transformer and apply this script:
Sorry, currently it's not possible to drill down in the weekday distribution. But I think you're right, we should definately add that, so I will add a ticket for it for the next release.
Doing a month distribution should also be possible, yes. Actually it also IS possible, if you don't mind applying a small trick.
Select a date column, eg. the "ORDERFACT.REQUIREDDATE" column from the order db.
Add a Javascript transformer and apply this script:
function eval() {
return REQUIREDDATE.getMonth() + 1;
}
eval();
And add a regular value distribution on top of that. Then you're ready to go!
That trick did the job.
Actually, was just curious, so tried a few functions on the column value, lot of them didn't work, but doing a...
Actually, was just curious, so tried a few functions on the column value, lot of them didn't work, but doing a...
EMPLOYMENT_DATE.getDay()...Seems to return the day as a number between 0 and 6. And then I can drill using the Value distribution analyzer. How do I figure out which functions I can call in the Javascript?
Hi franklin,
Pretty clever :) Actually the functions (or methods actually) available are based on the Java API of the value type. In your case the value is a Date, so the methods available are defined by the java.util.Date class. You can see them here:
http://download.oracle.com/javase/6/docs/api/java/util/Date.html
Other common values types are java.lang.Number, java.lang.String and java.lang.Boolean.
Pretty clever :) Actually the functions (or methods actually) available are based on the Java API of the value type. In your case the value is a Date, so the methods available are defined by the java.util.Date class. You can see them here:
http://download.oracle.com/javase/6/docs/api/java/util/Date.html
Other common values types are java.lang.Number, java.lang.String and java.lang.Boolean.
+1 for having the drill to detail available directly in the weekday distributino. Maybe you should simply broaden the scope of that analyzer to also include months?
Log in by clicking the login link at the top of the screen
Go back to forum.


