Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
amithmurali
Partner - Creator II
Partner - Creator II

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
Partner - Creator II
Partner - Creator II
Author

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.

View solution in original post

2 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi, 

Try this.

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


Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
amithmurali
Partner - Creator II
Partner - Creator II
Author

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.