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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
zahidrahim_ocp
Partner - Creator
Partner - Creator

Simple Set Expression till date sum not working on month filter But on Date

Dear Experts,

I have Date and Month filters selecting each filters i can get the last date of the month in a variable vDate.

Now selecting date filter expression calculate till date sum perfectly.

Whereas selecting month filter does not calculate till date sum. Month filter has "=MonthName(GL_DATE)"

Expression is:

Sum({<GL_DATE = {"$(='<=' & (vDate))"}>} SALE)

Regards,

Zahid Rahim

 

Labels (1)
1 Solution

Accepted Solutions
agigliotti
MVP
MVP

Let's try using the below expression for "Till Date Sale" column:

Sum( {< [GL_DATE YearMonth], GL_DATE = {"<=$(vDate)"} >} SALE )

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it

View solution in original post

7 Replies
agigliotti
MVP
MVP

what's your actual wrong result and the expected one in your app?

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
zahidrahim_ocp
Partner - Creator
Partner - Creator
Author

Thank you for the reply.

Selecting value from Date filter as 2019-05-31 show accurate value in "Till Date Sales" column.

Whereas selecting Month as May-2019 from Month filter show only the sale value for the month of May rather than from first date.

agigliotti
MVP
MVP

I suggest you to add a new field in your script as below:
MonthName(GL_DATE) as [GL_DATE YearMonth]
and using it as filter instead of a calculated dimension in UI.
I hope it helps.
The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
zahidrahim_ocp
Partner - Creator
Partner - Creator
Author

Using the adviced field as a filter did not work either.

agigliotti
MVP
MVP

Let's try using the below expression for "Till Date Sale" column:

Sum( {< [GL_DATE YearMonth], GL_DATE = {"<=$(vDate)"} >} SALE )

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
zahidrahim_ocp
Partner - Creator
Partner - Creator
Author

Can you please translate the usage of two fields separateed with comma [GL_DATE YearMonth], GL_DATE

agigliotti
MVP
MVP

the syntax  [GL_DATE YearMonth],  means the expression will ignore any selection on that field.

BR
Andrea

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it