Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
peterderrington
Creator II
Creator II

Display most common value as a Text Field

Hi,

Hoping someone out there might be able to help.

I have a combo chart which shows the number of transactions per day (Dimension) as a Bar Chart and then the number of times a particular transaction has occurred (expression) on that given day.

What i would like to be able to show is the most common operator who operated that day but shown as a text field above the number of transactions.

Is this possible?

transactions.jpeg

8 Replies
sunny_talwar

May be using FirstSortedValue() function

FirstSortedValue(Operator, -Aggr(YourExpression, Operator))

peterderrington
Creator II
Creator II
Author

Thanks Sunny,

I think I'm almost there. I need to nest 3 of these calculations into the one (there are max of 3 most common operators for each date) and I also need to try and make the text darker.

transaction2.jpeg .jpeg

PS I'm not sure why the original post has been replicated. I'll try to delete it.

sunny_talwar

3 calculations? you have to sum them? Max(Exp1 + Exp2 + Exp3)? or RangeMax(Exp1, Exp2, Exp3)?

peterderrington
Creator II
Creator II
Author

I've actually just added them as extra expressions so they list them one after the other which is great apart from two small things....

Is there anyway to get it to place the results on the top of the bar chart?

I tried changing the 'Display Options' from 'Text on Axis' to 'Values on Data Points' but then it only shows one Value rather than all three.

Its not actually showing the correct Result. e.g. on the below graph 31/05/2018 should show 'Henry Woodford', 'John Adamson' and 'None' (although I'd like to be able to remove the 'None' value)

transaction3.jpeg

sunny_talwar

I am not sure I am able to follow what you have and what you are trying to get. Would you be able to share a sample to look at what the end goal needs to be?

peterderrington
Creator II
Creator II
Author

So I now have the below graph which is really close.....

I need to be able to stop it displaying the 'None' values and if possible display the values it is showing above the bars rather than under the axis (but to be fair I can probably live with that one).

almost.jpeg

sunny_talwar

Are you using three different text on axis expressions?

peterderrington
Creator II
Creator II
Author

So having looked at the data properly (I know I should have done that to begin with!) I was able to just use the Expressions '[Operator 4:30-8]', '[Operator 8-8]' & '[Operator 8-5]' to display the name of the operator that was working that day / time period.

What I would like to be able to do is to stop it displaying anything if the value in that field reads "None".

I also need to be able to alter the colour of the values shown but I think I know how to do that.