Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I am looking to build an expression within one of my table charts that will pull back the [Actual Qty] result for the most recent OrderDate regardless of the current OrderDate selected. The most recent OrderDate will be equal to today's date. Whilst the result should not vary as the OrderDate selection changes, I would still need other selections to apply (i.e. country, client, etc). In essence I am looking to compare this OrderDate locked value vs current selection.
I have tried these two below so far but neither work as intended and instead both vary as the OrderDate selection changes. Any ideas? Thanks very much.
Sum ( $ { < OrderDate = { ' = Max ( OrderDate ' } > } [ Actual Qty ] )
Sum ( $ { < OrderDate = { ' = today() ' } > } [ Actual Qty] )
See the attached qvw:
=Sum({1<OrderDate = {"$(=date(max({1}OrderDate),'M/D/YYYY'))"}>}[Actual Qty])
Maybe something like:
Sum ( 1 { < OrderDate = { " = Max ({1} OrderDate " } > } [ Actual Qty ] )
That is not pulling back anything for me unfortunately.
I had the first 1 in the wrong place:
Sum ( { 1< OrderDate = { " = Max ({1} OrderDate " } > } [ Actual Qty ] )
Thanks. Expression is coming up as ok but still no results coming through sadly? All values are 0.
See the attached qvw:
=Sum({1<OrderDate = {"$(=date(max({1}OrderDate),'M/D/YYYY'))"}>}[Actual Qty])
This worked - thank you so much! I had to change the date format to match my date ('M/D/YYYY' -> 'DD/MM/YYYY') but this is exactly what I was after. Thank you again.