Forum Discussion
byfighting
6 years agoNew Member
Calculate Growth %
Hi All,
I want to calculate growth % off of Mar revenue. How can I achieve the results in column C in Power BI? Thank you!
Hi byfighting ,
You can create this calculated column:
Column = VAR _min = CALCULATE ( SUM ( 'Table'[Revenue] ), FILTER ( ALL ( 'Table' ), 'Table'[Date] = MIN ( 'Table'[Date] ) ) ) VAR result = ( [Revenue] - _min ) / _min RETURN IF ( result <> 0, result, BLANK () )Attached a sample file in the below, hopes to help you.
Best Regards,
Yingjie LiIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- AnonymousNot applicable
Hi byfighting
Calculated Column = VAR PreviousRow = TOPN ( 1, FILTER ( Table1, Table1[Date] < EARLIER (Table1[Date]) // try '>' if '<' donesn't give you the desires result ), [Date], DESC ) VAR PreviousValue = MINX ( PreviousRow, [revenew] ) RETURN ([revenew] - PreviousValue)/PreviousValue //returns number
//If you need the percentage from Revenew then RETURN ([revenew] - PreviousValue)/[revenew]OR
Calculated Column = VAR PreviousRow = TOPN ( 1, FILTER ( Table1, Table1[Date] < EARLIER (Table1[Date]) // try '>' if '<' donesn't give you the desires result ), [Date], DESC ) VAR PreviousValue = MINX ( PreviousRow, [revenew] ) Var G = IF(PreviousValue = 0,"", CONVERT(FORMAT(([revenew] - PreviousValue)/PreviousValue,"0#.00%"),STRING)) return G //returns string - Ashish_MathurSuper User
Hi,
Share the link from where i can download your PBI file.
- v-yingjlCommunity Support
Hi byfighting ,
You can create this calculated column:
Column = VAR _min = CALCULATE ( SUM ( 'Table'[Revenue] ), FILTER ( ALL ( 'Table' ), 'Table'[Date] = MIN ( 'Table'[Date] ) ) ) VAR result = ( [Revenue] - _min ) / _min RETURN IF ( result <> 0, result, BLANK () )Attached a sample file in the below, hopes to help you.
Best Regards,
Yingjie LiIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.