Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression Help

Hi everyone, s

I want to show values for selected month maximum date. I am using using this expression

Sum({<TransactionDate={"$(=Max(TransactionDate))"}>} Sales )

Can someone help me on expression

Thank You

3 Replies
sunny_talwar

Add date formatting to make it work:

Sum({<TransactionDate={"$(=Date(Max(TransactionDate), 'YourTransactionDateFormatHere'))"}>} Sales)

UPDATE: Max converts TransactionDate into a number and set analysis comparison only works when the formats are same on both side of the equation. So in order to get it to work, you will need to add Date().

Also, make sure that TransactionDate is not a TimeStampField, because if it is, then you might need a more complex expression to get it to work, or you might need to create a only datefield using Date(Floor()) function in the script to perform set analysis.

trdandamudi
Master II
Master II

What is your date format ?

swuehl
MVP
MVP

As Sunny said, there might be formatting issues, see also

Dates in Set Analysis

But maybe there are some other issues, but it's hard to tell missing any description of what you get and what you expect to get instead from your expression (that would be a basic 'issue reporting').