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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Calculate Monthly Growth that would respond to slicers for specific months.

Hi Team,

I need help with mu current logic for monthly growth:

Call Count Monthly Growth =
Var PrevMonth = CALCULATE(SUM('Table'[CallCount]),PARALLELPERIOD('Table'[ReportMonth],-1,MONTH))
Var ThisMonth = CALCULATE(SUM('Table'[CallCount]))
return DIVIDE((ThisMonth - PrevMonth), PrevMonth)

 

For this current logic, this wouldn't respond to slicers for a selected month. It only works for the previous month.

 

What I want is for the slicers would respond if I only select 2 months for example: January and April

I want to compare the growth rate for both months ONLY. So I want i to calculate the growth for those specific months.

1 ACCEPTED SOLUTION
SpartaBI
Community Champion
Community Champion

@Anonymous  there is a pattern for that by the amazing SQLBI.
Check out this video and article:
https://www.youtube.com/watch?v=JBN-x2duxSU
https://www.sqlbi.com/articles/comparing-with-previous-selected-time-period-in-dax/

In case this is the answer for your question please mark this as a solution for community visibility

View solution in original post

5 REPLIES 5
SpartaBI
Community Champion
Community Champion

@Anonymous  there is a pattern for that by the amazing SQLBI.
Check out this video and article:
https://www.youtube.com/watch?v=JBN-x2duxSU
https://www.sqlbi.com/articles/comparing-with-previous-selected-time-period-in-dax/

In case this is the answer for your question please mark this as a solution for community visibility

Anonymous
Not applicable

Thank you for this! This works!

However, it only works when using a table.

It doesn't work when I use a line chart (graph).

Can anyone help?

Anonymous
Not applicable

Hi @Anonymous ,

 

The reason for this is that the measure at this point is a scalar and only shows continuous lines when there are multiple monthly slices.

vcgaomsft_0-1651731406471.png

You can also choose some custom visuals, such as this one.

vcgaomsft_1-1651731696377.png

vcgaomsft_2-1651731741864.png

It will display the rate of change of the quantity on the top of the graph as well.

Attached PBIX file for reference.

 

Best Regards,

Gao
Community Support Team 

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems with it, please feel free to let us know. Thanks a lot!

Anonymous
Not applicable

Hello!

I forgot to update that the video posted actually works. I just forgot to apply a certain network because we want the data to be internal only.

 

However, do you or anyone know how this could work for weekly growth?

 

@Anonymous so please accept that comment with the video links as a solution to help other members find it more easily.
Regarding weekly growth there isn't a specific video for that, rather you need to combine the knowledge you gained from that video + apply it to a weekly custom column.
Check out these pattern for weekly calendars:
https://www.daxpatterns.com/week-related-calculations/

Don't forget to mark all the relvant comments as solutions

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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