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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
MagnusRydberg1
Partner - Contributor III
Partner - Contributor III

Showing a field depending on another field

I have a file that contains the number of users per day in my system. I want to display just the date that has the maximum value of users. In the example below i want to display the date 2023-11-06 as the date where the maximum number of users 589 occured.

How do I write this as a function in a KPI-box 

My file looks like this: 

Date NumberOfUsers
2023-11-01 525
2023-11-02 535
2023-11-03 545
2023-11-04 495
2023-11-05 526
2023-11-06 624
2023-11-07 547
2023-11-08 498

 

MagnusRydberg1_0-1700593297712.png

 

 

Labels (4)
10 Replies
sidhiq91
Specialist II
Specialist II

@MagnusRydberg1  If you need to get a single Date field then you can use the below expression:

Date(FirstSortedValue(Date,-NumberOfUsers),'MM/DD/YYYY')

If same number of users are shared across multiple Date values then you can use the below expression:

concat({<NumberOfUsers={"$(=Max(NumberOfUsers))"}>}Date,',')