Forum Discussion
Anonymous
5 years agoNot applicable
Last Nonzero Value
I created a measure to know my ability
Capacity (Mean) = SUM('Produção'[Production)/SUM('Produção'[Hours])
Right after I made a calculation to always return the last value of the filtered month.
Last Capacity = CALCULATE( [Capacity (Mean)], FILTER('Produção','Produção'[Date]=MAX([Date])))
However I want a way to return the last value of the month that is not zero.
Note, currently it returns the value 0 of the last day of the month but I would like it to return the value 937 which was the last to be produced.
I looked for other publications with this same problem but no solution solved for me.
Maybe add another filter
Last Capacity = CALCULATE( [Capacity (Mean)], 'Produção'[Date]=MAX([Date]), [Capacity (Mean)]>0 )
1 Reply
- lbendlinSuper User
Maybe add another filter
Last Capacity = CALCULATE( [Capacity (Mean)], 'Produção'[Date]=MAX([Date]), [Capacity (Mean)]>0 )