Forum Discussion
smartp121
5 years agoNew Member
Need help on a Row level data Calculation
Hi Friends, I need some help with this calculation, Don't know how to make this work I have data in the following format Year Month Revenue MTD Revenue 2020 4 489,611 ...
Anonymous
5 years agoNot applicable
Hi smartp121 ,
Here are the steps you can follow:
1. Create calculated column.
MTD_Revenue =
var _mtd=
CALCULATE(SUM('Table (2)'[PTD Direct Revenue Recognized]),FILTER('Table (2)','Table (2)'[Month]=EARLIER('Table (2)'[Month])))
-
CALCULATE(SUM('Table (2)'[PTD Direct Revenue Recognized]),FILTER('Table (2)','Table (2)'[Month]=EARLIER('Table (2)'[Month])-1))
return IF('Table (2)'[Month]=4,'Table (2)'[PTD Direct Revenue Recognized],_mtd)MTD_HXC =
var _mtd=
CALCULATE(SUM('Table (2)'[PTD HxC]),FILTER('Table (2)','Table (2)'[Month]=EARLIER('Table (2)'[Month])))
-
CALCULATE(SUM('Table (2)'[PTD HxC]),FILTER('Table (2)','Table (2)'[Month]=EARLIER('Table (2)'[Month])-1))
return IF('Table (2)'[Month]=4,BLANK(),_mtd)2. Result.
You can downloaded PBIX file from here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
smartp121
5 years agoNew Member
Hi Anonymous (Liu)
Thanks for the calculation , I'm getting below error, any help pls