Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
tracycrown
Creator III
Creator III

Show data on last date of the month

Dear all

Kindly advise how to plot cumulative sales data only on last date of the month ?.

Thank you

Tracy

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Ah, yes. Silly me. MonthEnd returns a value that also has a time part. Try this instead:

if(Date = Floor(MonthEnd(Date)), 1, 0) as IsLastDayOfMonth


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
tresesco
MVP
MVP

Try:        FirstSortedValue([Cum Sales],-Date)

Chanty4u
MVP
MVP

may be

= FirstSortedValue([Cum Sales],Date)

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Create a new flag field in the script:

LOAD

     Date,

     if(Date = MonthEnd(Date), 1, 0) as IsLastDayOfMonth,

     [Cum Sales]

FROM

     ...

     ;

You can then use that new flag field in your expression:

sum([Cum Sales]) changes to sum({<IsLastDayOfMonth={1}>}[Cum Sales])


talk is cheap, supply exceeds demand
tracycrown
Creator III
Creator III
Author

Dear gysbert wassenaar

I tried your method but no data shown on the chart, please check and advise.

Thank You

Tracy

tracycrown
Creator III
Creator III
Author

Dear tresesco

Please advise what is the meaning of FirstSortedValue ?

Thank You

Tracy

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Ah, yes. Silly me. MonthEnd returns a value that also has a time part. Try this instead:

if(Date = Floor(MonthEnd(Date)), 1, 0) as IsLastDayOfMonth


talk is cheap, supply exceeds demand