Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need to display the dimension of a summary value

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?

1 Solution

Accepted Solutions
Not applicable
Author

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!?

View solution in original post

4 Replies
Not applicable
Author

Try the attached doc....if that helps.

Not applicable
Author

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.

Not applicable
Author

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))

Not applicable
Author

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!?