Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I am using below expression for calculating sale in maximum date.
=FirstSortedValue({<[ERP Amount USD] -= {0}>} [ERP Amount USD],-[Invoice Date])
But it is returning null values for some rows.
Regards,
Agnivesh
Thanks for all your valuable help :
I got answer from below discussion
Now my problem has been resolved using below expression
=FirstSortedValue( aggr(sum([ERP Amount USD]),[HFM Entity],[Invoice Date]), -aggr(Max({<[ERP Amount USD]-={0}>}[Invoice Date]),[HFM Entity],[Invoice Date]) )
May be with distinct:
=FirstSortedValue(DISTINCT {<[ERP Amount USD] -= {0}>} [ERP Amount USD],-[Invoice Date])
AGGR( nodistinct MAX( AGGR( nodistinct <formula>
,[ERP Amount USD], [Invoice Date])
)
, [ERP Amount USD])
you can try with these two ways:
FIRSTSORTEDVALUE (OrderDate, – aggr(sum(Sale)) )
or
=Max ( aggr ( sum ( Sale ),OrderDate ) )
Not working
try
=FirstSortedValue(distinct {<[ERP Amount USD] -= {0}>} [ERP Amount USD],-[Invoice Date])
or
Sum({<[Invoice Date]={"$(=max([Invoice Date]))"}>} if([ERP Amount USD]>0,[ERP Amount USD]))
when i am using DISTINCT , it is giving syntax error,
but on every max date lot of transactions happen , so i need sum (ERP Amount USD) for that date.
If you have more than one [Invoice Date] which value you want to show?
max(invoice_date) , and sum(erp amount usd).
max(invoice_date) , and sum(erp amount usd) on max(invoice_date)