Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rjunai200
Helper I
Helper I

growth formula for new mesure

 

 

in excel i have the calculated feild as:

=IFERROR(('Current Year'/'Prior Year')-1,0)

 

and in power bi i have the mesure as:

 

Growth % = DIVIDE(SUM(PivotData[Current Year]), SUM(PivotData[Prior Year])-1)

 

 

but for some reason i am not getting the same number for growth with my excel calculated field (which i am trying to replicate) and this formula?

 

and the grand total is showing 3.1% in excel and its showing 63% in total on power bi,

 

 

3 REPLIES 3
konstantinos
Memorable Member
Memorable Member

 @rjunai200 Is difficult if we don't have the underlying numders.

 

Usually growth is in the format of 

 

Growth % =
DIVIDE (
SUM ( PivotData[Current Year] ) - SUM ( PivotData[Prior Year] ),
SUM ( PivotData[Prior Year] )
)

since DAX is using columns and not cells.

 

or add a bracket where you need the substaction 

DIVIDE (
SUM ( PivotData[Current Year] ) ,
(SUM ( PivotData[Prior Year] ) - 1)
)

 

or if these are two column of the same table

 

AVERAGEX ( PivotData,

DIVIDE (
SUM ( PivotData[Current Year] ) ,
(SUM ( PivotData[Prior Year] ) - 1)
))

 

or instead of AVERAGEX() use SUMX()

 

 

 

 

 

 

Konstantinos Ioannou

hi it did not work for some reason my data is set up like this

 

client 1  jan    555 (current yearrevenue)          666 ( prior year revenue)

 

client 1  feb    545 (current yearrevenue)          662 ( prior year revenue)

.....

 

 

client 2        jan

client 2        feb

it works in my end

 

Capture.PNG

Konstantinos Ioannou

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.