Forum Discussion
OAlvarezGarcia
7 years agoNew Member
lastest value
Hello, I am trying to get the output of units from the last machine in this case the formula will say for article 23442111114 total output (QuGood) 1087 units. The total output needs to be cal...
v-lili6-msft
Community Support
7 years agohi, OAlvarezGarcia
AkhilAshok had provided a measure that to calculate lastest value for each Article Number,
and if you want to recalculate the value of QuWaste,
you may try to this way:
Step1:
Add a column group date rank for each Article Number,
group rank = RANKX(FILTER('Table','Table'[Article Number]=EARLIER('Table'[Article Number])),'Table'[ManStartTime],,ASC)Step2:
Add a column that next time QuTotal
next time Qutotal = CALCULATE(SUM('Table'[QuTotal]),FILTER('Table','Table'[group rank]=EARLIER('Table'[group rank])+1))then calculate new QuWaste according to your logic like below:
new QuWaste = IF(ISBLANK('Table'[next time Qutotal]),'Table'[QuWaste],'Table'[QuTotal]-'Table'[next time Qutotal])
here is pbix, please try it.
https://www.dropbox.com/s/5wuexrvqcterh60/lastest%20value.pbix?dl=0
If it is not your case, please share sample pbix file or some data sample and expected output. You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.
Best Regards,
Lin