Announcements
cancel
Showing results for
Did you mean:
Contributor II

## Display Date for Max Value

I need to show all dates for when a value is at its maximum.

I need to show the Business_Date when the Advance_Equivalent is at its maximum for each Member_Number.

Can anyone help?

Labels (1)
• ### Qlik Sense

1 Solution

Accepted Solutions
Contributor II
Author

For anyone interested, here is the solution I came up with. I'm sure there is an easier way, but this is the only way i was able to get this to work. I left Business_Date as just the field name, as well as Member_Number. For Advance Equivalent I used the below expression as a dimension and excluded NULL values.

=Num(If(

10 Replies
Contributor III

If I understood your requirement correctly then I think you can use firstsortedvalue function to resolve your issue.

else please provide a sample set of data to work and provide solution.

Thanks,

Contributor II
Author

Thank you! It seemed to work with this expression

However, there may be a few different dates that contain the maximum Advance Equivalent. Is there a way to modify this expression to show each date?

Please let me know if sample data is still needed to provide clarity.

Contributor III

You can use group by to show the dates. Surely that will help if can you provide sample data.

Contributor II
Author

The results I'm getting are shown here, but it is only showing 1 date value for each member number.

As you can see here, there are several date values that are equal to the Max(Advance_Equivalent) for each Member_Number. I would like my table to list them the same as below, but only for maximum values.

Contributor II
Author

For anyone interested, here is the solution I came up with. I'm sure there is an easier way, but this is the only way i was able to get this to work. I left Business_Date as just the field name, as well as Member_Number. For Advance Equivalent I used the below expression as a dimension and excluded NULL values.

=Num(If(

I know you got the answer but just one suggestion as your expression can be simplified. May be this solution won't work in your scenario but try it

Dimension:

Member_Number

Expression:

Note: Please check suppress zero value option in chart properties

Contributor II
Author

For some reason, this expression only showed values for one member number.

I hope you are using the same expression and using dimension as suggested. It should work

Contributor II
Author

Yes, I am using all the fields exactly how you mentioned. Here's the result.

It displays in the way i would like to see, but only for one member number, not all of them.