Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have an expression in the pivot table and labeled it as max_date.
now I want to write
=Sum({<income_date=[max_date]}>}AMOUNT)
mean only amount of those are sum whose invoice_date is same as the date return in previous expression of the same table.
but it gives formatting error (little red mark) plz guide me for correct syntax.
thanks
Not sure, I understand using..
If(income_date = Previous(max_date), 1,0) as Flag
Then, Try this?
=Sum({<income_date= {1}>}AMOUNT)
OR
=Sum({<income_date= {"=income_date = max_date"} >}AMOUNT)
Can you share any sample data for this.
I suggest in place of the column name reference use the variables or direct set expression to be used
=Sum( { <income_date = {"$( =Max(DateField ))" } } >}AMOUNT)
sory read income as invoice in expression
=Sum({<invoice_date=[max_date]}>}AMOUNT)
Boomm!! Read this..
Qlik Community Tip: How to Get Answers to Your Post
my max_date expression is
=date(max(aggr(max({$<inv_period_date={"<=$(v_userdate)"}>}invoice_date),customer_id),'dd/mmm/yyyy')
this expression is returning max date less then the userdate value (coming from calendar).
suppose user select 21/NOV/2016 from calendar now the maximum invoice_ period_ date for the customer is returned which suppose is 01/NOV/2016
Now i wana return the value in next column the amount where invoice date = '01/NOV/2016'
=Sum({<invoice_date=[max_date]}>}AMOUNT)
hope you understand the issue
any suggestion?
1) how to directly put the max_date expression in second expression
2) how to use its label
either of the solution can be fine
I believe in set analysis you not able to use it directly you have to use Paranthesis "{ }"
Check help from Qlik Help
Try this
=Sum( { <income_date =
{"$(=date(max(aggr(max({$<inv_period_date={"<=$(v_userdate)"}>}invoice_date),customer_id),'dd/mmm/yyyy')" } } >}AMOUNT)
Try to create one variable and check in text box. Let me know what you are getting? Then declare that variable into analysis
=Sum( { <income_date = {$(VariableName)} >}AMOUNT)
OR
=Sum( { <income_date = {'$(VariableName)'} >}AMOUNT)
OR
=Sum( { <income_date = {'$(=VariableName)'} >}AMOUNT)