Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
QlikWorld Online 2021, May 10-12: Our Free, Virtual, Global Event REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
abc_18
Creator II
Creator II

How to get max of value based on date and month

Hello,

I have a data set which contains opening and closing value for a particular end time, I have to show Max of closing value for a month and a date .

First measure is based on month :-For example, in below data set for month of 'Nov',  Max of End time is 21:00:00.0000  for date '2019-10-30' and closing balance is 5676.43 , so for month of 'NOV' it should give '5676.43'

Second measure is based on Date :- If user selects Date as  '2019-11-25', it should return max value of end time for this  date that is '10687.71.

I have to show these values in a line chart with two dimensions:- Month and Date and above two measures.

So upon selection of Month and date it will display values.

End timeClosing valueOpening valueDateFinancial month
2019-11-25 19:00:00.000010646.4067968.1742019-11-25Nov
2019-11-25 19:00:00.000013093.77610809.8642019-11-25Nov
2019-11-25 20:00:00.000018038.21713001.0792019-11-25Nov
2019-11-25 20:00:00.000028487.37117938.822019-11-25Nov
2019-11-25 21:00:00.00006557.80412594.8262019-11-25Nov
2019-11-25 21:00:00.000010275.30817922.322019-11-25Nov
2019-11-25 21:00:00.000010687.7120213.2812019-11-25Nov
2019-10-31 21:00:00.00005676.4365436542019-11-30Nov

 

Please suggest.

Labels (2)
3 Replies
lorenzoconforti
Specialist II
Specialist II

Can you please explain in more details what type of chart you are looking for? A line chart with two dimensions is possible but I don't think very readable for the data you have

Maybe plot it in Excel so that it clearer

abc_18
Creator II
Creator II
Author

 

Hello,

I have attached screenshot here for reference, which display two line charts, first one is for month selection and another one is for date selection.

First line chart should show data based on max of Month along with last entry of 'End time'

Ex:- If user selects month as 'NOV', then max of month is 2019-10-30 along with max of 'End time', single entry it should return.

and second one is based on max of date.

If user selects date as 2015-04-13, then it should return the max of 'End time' entry value for this particular date.

Hope I have explained it clearly.

Regards

lorenzoconforti
Specialist II
Specialist II

See attached; I think I understand what you are trying to achieve

I think the problem you have is that you have data points (at least in the sample you have shared) that have the same timestamp; so, sorting them might result in getting the incorrect output (i.e. the wrong last entry)

Probably the best thing is to rely on the load order and possibly create a counter when the script is loaded to make the selection of he last data point easier

Have a look and let me know if this is in the right direction