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
qixue
Frequent Visitor

How to calculate average growth %?

I have a dataset in below format:

 

Date         Sales Amount

2017/1/1  1,000

2017/1/1  5,000

2017/1/2  7,000

...

 

So my growth % on 1/2 = (7000-6000)/6000

 

Similarly, I will have growth % for each day. Now I want to show the average growth % by year and by month. How to achieve it? Thank you!

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @qixue,

 

You can try to use below formula to calculate the DoD growth %:

Measure:

 

DoD Growth = 
VAR current_Date =
    MAX ( 'Table'[Date] )
VAR current_amount =
    SUMX ( FILTER ( ALL ( 'Table' ), [Date] = current_Date ), [Amount] )
VAR previous_amount =
    SUMX ( FILTER ( ALL ( 'Table' ), [Date] = current_Date - 1 ), [Amount] )
RETURN
    DIVIDE ( current_amount - previous_amount, previous_amount, 0 )

 

 

>>Similarly, I will have growth % for each day. Now I want to show the average growth % by year and by month. How to achieve it? 

You can create a summary table with 'dod growth', then wirite a measure to calcuate the average. After these steps, create a table visual with different date column as the group, you can switch hierarchy levl to get the different average of current level.

 

Calculate table:

 

Summary table =
VAR summaried =
    SUMMARIZE ( 'Table', [Date], "Total Amount", SUM ( 'Table'[Amount] ) )
RETURN
    ADDCOLUMNS ( summaried, "DOD Growth %", [DoD Growth] )

Measure:

 

 

AVG DoD = AVERAGE('Summary table'[DOD Growth %])

10.PNG11.PNG

 

Regards,

Xiaoxin Sheng

 

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @qixue,

 

You can try to use below formula to calculate the DoD growth %:

Measure:

 

DoD Growth = 
VAR current_Date =
    MAX ( 'Table'[Date] )
VAR current_amount =
    SUMX ( FILTER ( ALL ( 'Table' ), [Date] = current_Date ), [Amount] )
VAR previous_amount =
    SUMX ( FILTER ( ALL ( 'Table' ), [Date] = current_Date - 1 ), [Amount] )
RETURN
    DIVIDE ( current_amount - previous_amount, previous_amount, 0 )

 

 

>>Similarly, I will have growth % for each day. Now I want to show the average growth % by year and by month. How to achieve it? 

You can create a summary table with 'dod growth', then wirite a measure to calcuate the average. After these steps, create a table visual with different date column as the group, you can switch hierarchy levl to get the different average of current level.

 

Calculate table:

 

Summary table =
VAR summaried =
    SUMMARIZE ( 'Table', [Date], "Total Amount", SUM ( 'Table'[Amount] ) )
RETURN
    ADDCOLUMNS ( summaried, "DOD Growth %", [DoD Growth] )

Measure:

 

 

AVG DoD = AVERAGE('Summary table'[DOD Growth %])

10.PNG11.PNG

 

Regards,

Xiaoxin Sheng

 

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Ashish_Mathur
Super User
Super User

Hi,

 

Share a dataset/download link of your file and also show your expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.