Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have table with sales, divided by sales points.
in first expression i calculate max date, where sales > 0
max({<[Quantity]={">0"}>}Date)
in second expression i calculate sales with date, where sales > 0
sum({<Data={"$(=max({<[Quantity]={'>0'}>}TOTAL <SPoint> Data))"} >}[Quantity])
but in the second expression filter {<Data={"$(=max({<[Quantity]={'>0'}>}TOTAL <SPoint> Data))"} >} is not aggregated by Spoints, it's the same for all of them.
The necessary result for me:
Sales for point 6 with 21.07.2014
Sales for point 8 with 21.07.2014
Sales for point 12 with 18.07.2014
See attached file.
Thank you!
hi
first of all , set analysis won't work for you ,
the reason is that set analysis always return the same value to all rows in the chart , because set analysis defines a selection in the data model and as with all selections they effect all data the same
attach is an example using firstsortedvalue hope , it will help you
Date instead Data in second expr.
Hi,
Is this the same way u want to get desire output,
PFA
To pick the Max Date try something like this:
SUM({<DateField={'$(=Max(DateField))'}>}Quantity)
Regards
Aviral Nag
ok.
in your example:
in first expr you're calculating max date, where quantity > 0 , yes ?
in second expr you're aggregating quantity by sales points, but without date condition from previous expr.
in second expr i need to get quantity, connected with max date, where sales >0
Thank you!
this expr is useful, but not full correct for me.
i need to get not only the quantity with max date.
max date must be such, where quantity > 0
thank you!
You can mention in exp as,
aggr(sum({<[Quantity]={">0"}>}Quantity),Spoint)
Thank you.
But this expression get me aggregated quantity > 0 for all period, but i need the same, but for max date, where quantity > 0
Try this:
sum({<DateField={'$(=Max(DateField))'},Quantity={">0"}>}Quantity)
try some thing like below
SUM({<DateField={'$(=Max(DateField))'}>} if(Quantity>0,Quantity))