Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
muhammadraza
Partner - Creator
Partner - Creator

Get value of each month's last date

Hello Guyz,

I have the following table

2-3-2014 3-15-33 PM.png

I want to get the value of each month last date, like from the above table I would like to get values like

For Feb 1000

For March 1500

For April 1200

and want to display in the bar chart (in the document).

Please guide how can I achieve this.

The document and excel file are attached.

Regards,

Muhammad Raza

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Use the firstsortedvalue function: firstsortedvalue(Balance, -AsOfDate). See attached qvw.


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Gysbert_Wassenaar

Use the firstsortedvalue function: firstsortedvalue(Balance, -AsOfDate). See attached qvw.


talk is cheap, supply exceeds demand
muhammadraza
Partner - Creator
Partner - Creator
Author

thank you so much, it is solved!

Not applicable

HI,

can u please share me the script as iam unable to download Qvw file

regards

Mahesh T

Aspiring_Developer
Creator III
Creator III

Hello @Gysbert_Wassenaar 

I have similar issue but I am unable to download the qvw due to some restrictions.

Could you please share the script here ?

 

Thanks in advance

BrunPierre
Partner - Master
Partner - Master

@Aspiring_Developer Try this

Script

LOAD *,
Month(Date(Date#(AsOfDate,'DD-MMM-YYYY'),'DD/MM/YYYY')) as Month
Inline[
AsOfDate,Balance
28-Feb-2014,1000
25-Feb-2014,1400
31-Mar-2014,1500
30-Apr-2014,1200
29-Apr-2014,1100
];

 

Expression

FirstSortedValue(Balance,-aggr(Sum(Balance),Month),1)