Forum Discussion
Anonymous
7 years agoNot applicable
partial month calculation
year month amount year month amount 2017 1 1000 2017 1 1000 2017 2 3000 2017 2 2000 2017 3 7000 wanted result-> 2017 3 4000 2017 ...
- 7 years ago
Hi Anonymous,
Maybe you could try to modify the formula as below:
Column = VAR a = 'Table1'[month] - 1 RETURN [amount] - CALCULATE ( SUM ( Table1[amount] ), FILTER ( 'Table1', 'Table1'[month] = a && 'Table1'[year] = EARLIER ( Table1[year] ) && 'Table1'[code] = EARLIER ( Table1[code] ) && 'Table1'[company] = "dk" ) )Regards,
Daniel He
Anonymous
7 years agoNot applicable
Column = var a='UploadAccounts'[Month]-1
return [-amount]-CALCULATE(SUM(UploadAccounts[-amount]),FILTER('UploadAccounts','UploadAccounts'[Month]=a&&'UploadAccounts'[Year]=EARLIER(UploadAccounts[Year])&&'UploadAccounts'[AccountCode]=EARLIER(UploadAccounts[AccountCode])))
code so applied its not working, it give as output strange result
example jannuar
1000
it turn february 2000
it doest make sum february-januar
just moltiply 2
check the screen
v-danhe-msft
7 years agoMicrosoft Employee
Hi Anonymous,
Could you have downloaded my pbix file to have a view? All the data I used is given from your last post, if it is still incorrect, could you please upload your pbix file to OneDrive or Dropbox and send the link here to let me have a test?
Regards,
Daniel He