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
Anonymous
Not applicable

Calculate growth dynamically

Hello everyone !

I have a fact table connected to dimension tables (Time, Market and Period)

For each product, i would like to calculate the growth per period [L3Months, L6M, MAT]

My data for a specific product is presented as follows and the only selector i can have in the report is a location selector.  As for the date, I compare to the last available month

 

cap1.PNG

 

 

 

 

 

 

 

 

 

 

 

I have created the following dax measure to calculate the growth for 3M. However, this formula isn’t dynamic, (i can’t change the dateadd interval to go back 6months for L6M or 12 months for MAT) so I needed to create a measure for each case

 

cap2.PNG

 

 

 

 

 

And at the end I have the following table

cap4.png

I don’t know what to do to have be able to display a table as follow, I tried to use switch , if cases and didn't manage to get any results. 

cap3.PNG

 

Thank you so much for your help in advance, 

Mari,

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hello @v-yiruan-msft 

 

For my data I actaully have the the data aggregate for different periods (3m, 6m,..)

So what I did I addeded a filter to the specific period that I want and managed to get the growth for that specific period. 

 

So now I have the correct results

Capture.PNG

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hello @v-yiruan-msft 

 

Thank you for your reply, I actaully managed to change the forumla and get a result on my own. Juste needed to filter correctly my data 

 

Thank you again for your help, 

Mariem

Hi @Anonymous ,

Do you mean that it can't get the correct result when apply any filter? Could you please provide your filtered fields with screenshots? It is better if you can provide your sample pbix file in order to make troubleshooting and get solution. Thank you in advance.

Best Regards
Community Support Team _ Rena Ruan
If this post helps, then please consider Accept it as the solution to help the other members find it more.

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hello @v-yiruan-msft 

 

For my data I actaully have the the data aggregate for different periods (3m, 6m,..)

So what I did I addeded a filter to the specific period that I want and managed to get the growth for that specific period. 

 

So now I have the correct results

Capture.PNG

v-yiruan-msft
Community Support
Community Support

Hi @Anonymous ,

You can refer the following blogs to achieve it. If it's not applicable for your scenario, please provide some sample data in dimension table and fact table and relationships among them. Thank you.

Calculate Percentage Growth Over Time with Power BI

Calculate and Analyzing Growth Rates With DAX Language

Best Regards
Community Support Team _ Rena Ruan
If this post helps, then please consider Accept it as the solution to help the other members find it more.

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.