Skip to main content
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
Partner - Champion
Partner - Champion

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

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

View solution in original post

7 Replies
agigliotti
Partner - Champion
Partner - Champion

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

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
Partner - Champion
Partner - Champion

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.
zahidrahim_ocp
Partner - Creator
Partner - Creator
Author

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

agigliotti
Partner - Champion
Partner - Champion

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

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

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
Partner - Champion
Partner - Champion

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

BR
Andrea