Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
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?

View solution in original post

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

sunny_talwar

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

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