Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a table of inventory items transactions, I'm trying to have a pivot table per item and other dimensions to get the unit cost per item for the last transaction done per date, but its working only for one item selected, but for all items it result with zero, following expression had been used
sum(if(trasaction_date=MAX(TOTAL transaction_date),trasaction_cost,0))
if someone can help on this issue, thank you
Firas Ahmed
Can you upload sample file? It helps to understand your problem easier.
You may need to use Aggr function.
Hi,
Please try this one.
sum(if(trasaction_date=aggr(MAX(TOTAL transaction_date),item)trasaction_cost,0))
Regards,
VIshal
You can also try this one as:
if(trasaction_date=MAX(TOTAL transaction_date),sum(trasaction_cost),0)
Regards:
Narender
HI Ahmed,
First you store the MAX transaction_date in to a variable.
You can use this variable in the expression, it will be eaiser way.
Regards,
Yaseen
use this
=sum(aggr(max(date),Transation_id)transaction_cost)
Best Regards,
Anant
Hi
Something like this:
Sum({<trasaction_date = {"$(=Date(Max(transaction_date)))"} trasaction_cost)
Hope that helps
Jonathan
thank you Vishal, statement did not solve the issue, it returns zero always (one or all items), it may missing one more parameter
thank you all for reply, but actually it did not work, all of them still return zero, I would appreciate your help I will brief issue again just in case:
table structure (item, quantity, cost, transaction date)
dashboard target : inventory aging
current issue: to get the cost of the last transaction per item as per date dimension selected
regards
Firas
Can you upload your Sample Application