Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

amithmurali
Contributor

Show Data for the Last available date on a selected month.

Hi guys,

I have a Reports in which i have to show them the daily sales. by default it should show the latest dates data and it is showing but when i select some months the value is 0.

The equation i used is " sum({<NumMonth = {"$(vMaxNumMonth)"},Date = {$(=max(Date))}>}(MonthSale)) "

Where

           vMaxNumMonth = =max({<Year = {"$(vMaxYear)"}>}NumMonth)

It should show the Last available date on the selected Month.

1 Solution

Accepted Solutions
amithmurali
Contributor

Re: Show Data for the Last available date on a selected month.

I was having some decimal points in my dates fields . thats why qv was not able to give me the data. i used the floor function

floor(Date) as Date to remove the unwanted decimals.

then i was bale to get the desired data.

2 Replies

Re: Show Data for the Last available date on a selected month.

Hi, 

Try this.

sum({<Date = {$(=max({<NumMonth = {"$(vMaxNumMonth)"}, Year = {"$(vMaxYear)"}>}Date))}>}(MonthSale))


Regards,

Kaushik Solanki

amithmurali
Contributor

Re: Show Data for the Last available date on a selected month.

I was having some decimal points in my dates fields . thats why qv was not able to give me the data. i used the floor function

floor(Date) as Date to remove the unwanted decimals.

then i was bale to get the desired data.

Community Browser