Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ale_nilo84
Contributor
Contributor

Looking for the last month máximum.

Hello, good day

I have a chart with three fields

Date : im date format

Time : in hour format

Plate: In text format

I also have a vperiodonummax variable , which calculates the last month.

I need to look for the máximum time and its associated plate with the group of plates of the last month.

1 Solution

Accepted Solutions
sunny_talwar

May be like this:

Dimension

Date

Expression

Max({<Month = {"$(=vperiodonummax)"}>}Time)

FirstSortedValue({<Month = {"$(=vperiodonummax)"}>}Plate, -Time)

If that doesn't work, would you be able to provide a sample to look at?

View solution in original post

4 Replies
sunny_talwar

May be like this:

Dimension

Date

Expression

Max({<Month = {"$(=vperiodonummax)"}>}Time)

FirstSortedValue({<Month = {"$(=vperiodonummax)"}>}Plate, -Time)

If that doesn't work, would you be able to provide a sample to look at?

ale_nilo84
Contributor
Contributor
Author

Thanks works with FirstSortedValue !! However it appears a null value when two values ​​are equal field time . How I can fix it ?

Not applicable

If you have only 3 dimentions you have to do some more simple for example

Load

Plate,

Max(Date)

From Nomber_Table

Group by Plate;

After you can Join This Table for example with your Fact Table with the column Plate

Best Regards!!!

sunny_talwar

Which one do you want to pick? May be try this

FirstSortedValue(DISTINCT {<Month = {"$(=vperiodonummax)"}>}Plate, -Time)