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 Current Month Vs Month YA

Hi,

 

I'm trying to see some growth numbers comparing this months year vs last months year. These aren't values so I'm using COUNT:

 

antoineleduke_0-1643387722978.png

 

To get values for the previous year, I created this measure:

antoineleduke_1-1643387759490.png

 

However, it doesn't seem to work. Does anyone know what I'm doing wrong? 

 

My end goal is to have the growth numbers displayed by month

antoineleduke_2-1643387863290.png

 

Thanks!

 

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

Hi @Anonymous,

 

For each month in the bar chart, the filter context only contains dates of currently month.

So add REMOVEFILTERS() to your measure. Or some other functions like ALL(), ALLEXCEPT(), ALLSELECTED().

processed report last month =
CALCULATE(
    [processed report this month],
    PREVIOUSMONTH( 'Table'[Date] ),
    REMOVEFILTERS()
)

Best Regards

Community Support Team _ chenwu zhu

 

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

View solution in original post

5 REPLIES 5
v-chenwuz-msft
Community Support
Community Support

Hi @Anonymous,

 

For each month in the bar chart, the filter context only contains dates of currently month.

So add REMOVEFILTERS() to your measure. Or some other functions like ALL(), ALLEXCEPT(), ALLSELECTED().

processed report last month =
CALCULATE(
    [processed report this month],
    PREVIOUSMONTH( 'Table'[Date] ),
    REMOVEFILTERS()
)

Best Regards

Community Support Team _ chenwu zhu

 

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

ValtteriN
Super User
Super User

Hi,

PARARRELPERIOD with the settings you have returns the value from last month. To get LY you can use e.g. PREVIOUSYEAR. e.g. CALCULATE([Measure],SAMEPERIODPREVIOUSYEAR('Calendar'[Date])).

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Hi,

 

Thank you. It looks like I'm getting values which is great but the values are exactly the same:

 

antoineleduke_0-1643390909693.png

 

antoineleduke_1-1643390924949.pngantoineleduke_2-1643390935208.png

 

Would you know what I'm doing wrong here? 

Hi,

Are you using date column from your calendar in your visualization? Also what kind of relationship do you have between your calendar and fact table?

ValtteriN_0-1643393881805.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Hi, I'm using my month name from my data table

antoineleduke_0-1643395136429.png

 

antoineleduke_1-1643395211993.png

Here is the relationship between both tables

antoineleduke_2-1643395257452.png

 

 

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.

Top Solution Authors