Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to get sum of values in my table for the latest available date when no date is selected in filter.
I am using below expression, but somehow its not working;
sum({<date = {$(=max(date))}>}Value)
Can anyone please help me out with this?
=sum({$<Date={"$(=Date(Max(Date),'DD/MM/YYYY'))"}>} Value)
output:
when i selected a Date:
@Taoufiq_Zarra Thanks for the expression. Even I worked and developed the mentioned expression;
sum({<date={"=date=Max(total date)"}>}Value)
Does this look correct to you, it is working as per my requirement!
@Saurabh07 check the date format or format it directly In set for example if your date format is DD.MM.YYYY
=sum({$<date={"$(=Date(Max(date),'DD.MM.YYYY'))"}>} Value)
Hello @Taoufiq_Zarra ,
Thank you for the reply, the date format seems to be fine. The error I am getting is 'Error in set modifier as hoc element: ',' or ')' expected.
The expression is getting evaluated in the expression editior, at the bottom preview shows:
Sum({<date = {30.06.2020}>} Value), which is exactly what I need here. But this error!!!!!
@Saurabh07 the SET DateFormat='DD.MM.YYYY' ?
@Taoufiq_Zarra Why would Dateformat matter in this case. I just want to pick the latest date available and display the sum for value for it. Correct me if I am misunderstanding something here?
@Saurabh07 can you share a sample data ?
@Taoufiq_Zarra Attached is the sample dataset. Hope this helps.
I have a filter to select the date at the top. So whenever any date is selected exclusively the sum of value should be displayed for that particular date. But when nothing is selected in Date filter, the sum of values should be displayed for latest (i.e. Max) date.
=sum({$<Date={"$(=Date(Max(Date),'DD/MM/YYYY'))"}>} Value)
output:
when i selected a Date:
@Taoufiq_Zarra Thanks for the expression. Even I worked and developed the mentioned expression;
sum({<date={"=date=Max(total date)"}>}Value)
Does this look correct to you, it is working as per my requirement!
@Saurabh07 yes its correct !