Forum Discussion
srk_powerbi
5 years agoHelper II
calculate measure help..
hi , i have a table like below. I want to calculate a measure base on current month. Lets say we are in june month now, so I want to calcuate a measure called '% expected' by using this logic % ce...
- 5 years ago
- Anonymous5 years ago
Hi srk_powerbi ,
Based on your sample data, you can create the following measure. My measure is updated dynamically, no slicer selection is required.
% cexpected = var _aa=CALCULATE(SUM('Table'[Amount]),FILTER('Table',[CalcType]="sales"&&[Fy]<=YEAR(TODAY())&&[Fm]<=MONTH(TODAY()))) var _bb=CALCULATE(SUM('Table'[Amount]),FILTER('Table',[CalcType]="sales expected"&&[Fy]<=YEAR(TODAY())&&[Fm]<=MONTH(TODAY()))) return DIVIDE(_aa-_bb,_aa)Tips: [Fm] column is a calculated column which retruns the month number.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
srk_powerbi
5 years agoHelper II