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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

displaying maximum value and date in text box

Hi community,

I had a case where i need to display date and maximun of count of some value for that date  in a text box like as below

date - value.

I acheived this through script

But my problem here is the value should change according to selection monthly or weekly which is not happening. How can i do this using expressions directly?

1 Solution

Accepted Solutions
tresesco
MVP
MVP

='Maximum Viewers:' &MAx(Aggr(Sum(Viewers), Date))

='Maximum Viewers - Date:' &FirstSortedValue(Aggr(Date,Date),-Aggr(Sum(Viewers), Date))

View solution in original post

8 Replies
PrashantSangle

Hi,

Just Nullify the other field which affect your max data.

Use this in set analysis.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
tresesco
MVP
MVP

Max(Date) - for max date

FirstSortedValue( field, - Date) - value of a field against max date

Not applicable
Author

Sorry, but i didn't get you. can you please explain me in detail. If possible with some example

Not applicable
Author

But i need to do some grouping right, wrt date so that i can ge the max(value)

tresesco
MVP
MVP

Share your sample data/qvw and state expected output.

Not applicable
Author

jus assume a case where i had date and viewers for that partcular date like below

date   viewers

21          150

14         100

06          200

21          250

14          250

06          325

.

Now i want to get the (sum(viewers)) grouped by date

date  sumof viewers

21     400

14     350

06      525.

Then from the above i need to display ina text box, maximum viewers and its corresponding date, minimum values and its corresponding date in a text box like below

max date 06-525

mindate -14-350

Not applicable
Author

Find the PFA,may you get the idea to solve your requirement..

tresesco
MVP
MVP

='Maximum Viewers:' &MAx(Aggr(Sum(Viewers), Date))

='Maximum Viewers - Date:' &FirstSortedValue(Aggr(Date,Date),-Aggr(Sum(Viewers), Date))