Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
using set analysis how can i get total sale
i want sum of sales of max date
but if i select any year then it return sum of sale of that year of max date.
if i select any month then it return sales of max date for that month
With variable try this
SUM( {1 < Date= {$(vMaxDate)} , > } Value)
Without comma sorry
SUM( {1 < Date= {$(vMaxDate)} > } Value)
giving error
Create a sample qvw that would help us help you, because for date comparison format plays a big role as well, otherwise my suggested expression should work. Note the inclusion of '{1}' in the max().
sum({<Date={'=$(=max({1}Date))'}>} Sale)
Or,
sum({<Date={'=$(=Date(max({1}Date)))'}>} Sale)
Inside the script you can create a variable:
LET vMaxDate = peek( 'FieldData', -1, 'TableName');
Then you can use the variable
SUM({1 < FieldDate= {$(vMaxDate)} > } Value)
Regards
Claudio
Hi,
In your variable define vMaxDate = max(Date)
and try below
=sum({<Date={'$(vMaxdate)'}>} Sales)
or share your sample app.
Regards
ASHFAQ