Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlikees!
This is a repost, as I may have misfiled my previous one. apologies for the duplication.
I’m not sure how to approach this requirement, and I’m hoping for some help from you guys. (and gals)
Let’s assume I have sales, and sales occur on dates. I’m interested in understanding which day of the week the most sales occur on. Simple you say! Use the dayofweek() function, get the day of the week, and chart the number of sales that occurred on each day of the week. Done!
Not so fast… I want to know the name of the day of the week on which the most sales occurred, and I want the string to display as a fact on the front page of the dashboard. “The most sales occurred on Wednesday”
Any thoughts? Strategies? I can’t seem to wrap my head around the aggr statement I suspect I’m going to need to use…
I'm trying to accomplish this without pre-summarizing the table in the load script so the user can dynamically select a time frame to measue against.
Help?
I found a solution.
Remember when I said “Use the dayofweek() function, get the day of the week, and chart the number of sales that occurred on each day of the week. Done!” I was part of the way there…
Take that chart, sort it by the number of sales, suppress the totals, and in the ‘presentation’ tab hide the column that is showing the actual y value, and while you’re there, restrict the max number of results to 1. In style, make the table and all borders etc transparent… aaaand TA DA, you’ve got the word you need. Insert the captionless table into a text object, and there ya go.
Can anyone say KLUDGE!?
Try the attached doc....if that helps.
Thanks Jasleen,
It's close, but I need to know the day of the week on which the most sales happened without having to select anything.
hmm..I was going by the last statement in your original post. Anyways.
If you wish not to select anything, then I guess it would be easier to generate the day name in the script along with the sale aggregation by date - then display the required msg in a txt box (because there would be 1:1 value for each day date.)
I did try (fruitlessly though!) =Max(Aggr(Sum(Sales), Dt))&'$ worth of Sales happened on ' &MaxString(WeekDay(Dt))
I found a solution.
Remember when I said “Use the dayofweek() function, get the day of the week, and chart the number of sales that occurred on each day of the week. Done!” I was part of the way there…
Take that chart, sort it by the number of sales, suppress the totals, and in the ‘presentation’ tab hide the column that is showing the actual y value, and while you’re there, restrict the max number of results to 1. In style, make the table and all borders etc transparent… aaaand TA DA, you’ve got the word you need. Insert the captionless table into a text object, and there ya go.
Can anyone say KLUDGE!?