Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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

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

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

Contributor
Contributor

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!!!

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

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