Can you attach sample .TWBX file to understand better.
Please attach a sample /dummy .twbx / .xls file along with your expected result.
perhaps if you create a index() could solve the problem.
But please attach the .twbx
Finally I found the solution. I created a dimension where
IF [Date]=max Date then [Consumed Quantity] else 0 END
Thanks for your interest and help
But I would appreciate if you could help me, additional to this, to calculate the average of non zero values for every name.