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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
JSmart913
Frequent Visitor

Help With creating a caclulation when data is all dated monthly

I have a census flat file that is updated monthly - So for 2025 all the january dates on the data say 1/1/2025 and then Feb. will have  data but the date will be 2/1/2025 and so on showing the changes in different accounts each month.  So i want to create a calculation for that year over year growth change for 2023-2024.  So I would need to create the calculation based on the data in the latest data dump for each year 12/1/2023 and 12/1/2024.  How would I do that given that I only want to look at the data from the december time frame?

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @JSmart913 ,

 

Please refers to the following steps.

The test data is as follows.

vdengllimsft_0-1738732569270.png

 

Create a measure to be used for calculating percentage growth.

 

Percentage growth =
VAR previousYearValue =
    CALCULATE ( SUM ( 'Table'[Value] ), SAMEPERIODLASTYEAR ( 'Table'[Date] ) )
VAR currentYearValue =
    SUM ( 'Table'[Value] )
RETURN
    DIVIDE ( currentYearValue - previousYearValue, previousYearValue )

 

 

Adding this measure to the matrix resulted in the following. Hopefully it will meet your needs.

vdengllimsft_1-1738732709486.png

 

Please see the attached pbix for reference.


Best Regards,
Dengliang Li

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

4 REPLIES 4
Anonymous
Not applicable

Hi @JSmart913 ,

 

Please refers to the following steps.

The test data is as follows.

vdengllimsft_0-1738732569270.png

 

Create a measure to be used for calculating percentage growth.

 

Percentage growth =
VAR previousYearValue =
    CALCULATE ( SUM ( 'Table'[Value] ), SAMEPERIODLASTYEAR ( 'Table'[Date] ) )
VAR currentYearValue =
    SUM ( 'Table'[Value] )
RETURN
    DIVIDE ( currentYearValue - previousYearValue, previousYearValue )

 

 

Adding this measure to the matrix resulted in the following. Hopefully it will meet your needs.

vdengllimsft_1-1738732709486.png

 

Please see the attached pbix for reference.


Best Regards,
Dengliang Li

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

Greg_Deckler
Community Champion
Community Champion

@JSmart913 I would think you would just filter the data coming in so that only December is included in each table.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Right but how would i show the % change year over year since it is the same field.  I would need to take the data from 12/1/2023 lets say it was 93 and do a calculation to show the growth to the 12/1/2024 data  151 (so ((151-93)/93) - being a 62.3% increase

 

JSmart913_0-1738687214155.png

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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