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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Previous year and current year Comparision percentage

i have three year wise data compare current month and previous month calculations 

 

 

I have  data like below 

 

Period              Revised closing value

1-4.2019                     56
1-4.2019                     66

1-5.2019                    77

1-5.2019                    45

1-5.2019                    45

1-6.2019                  34

1-6.2019                  34

1-7.2019                  56
1-8.2019                   66

1-9.2019                   77

1-9.2019                   45

1-10.2019                 45

1-11.2019                 34

1-12.2019                 34

1-1.2020                   56
1-2.2020                   66

1-3.2020                   77

1-4.2020                   45

1-5.2020                   45

1-6.2020                   34

1-6.2020                   34

 

 

i want current year value  and previous year  percentage value 

 

i have tired below measure but now wokring getting blank value

 

%Prvs = VAR LastMAXDate = MAX ( Data[Period] )
var currentvalue = CALCULATE (
SUM ( Data[Revised closing value] ),
Data[Period] = LastMAXDate
)
var prvsyear =
CALCULATE (
SUM ( Data[Revised closing value] ),
Data[Period] = LastMAXDate-365
)
return DIVIDE((currentvalue-prvsyear),prvsyear)
 
 
any idea .thanks in advance 
3 REPLIES 3
Anonymous
Not applicable

@amitchandak   i have data set like mid date and end like 

    period                       Revised closing value

 01-4-2019                        45

 15-4-2019                        55

  .

  .

   .

 15-8-2020                        45

 01-9-2020                        55

 15-9-2019                        45

 

i want divide the current  year value ,previous year value. i am tring to apply measure getting value blank. how to get only month and year . my measure picking date also . i want only month year .  

 15-4-2019                        55

 01-4-2019                        45

 15-4-2019                        55

 

  

@Anonymous You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000

Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008



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...
amitchandak
Super User
Super User

@Anonymous , Not very clear,

 

With help from date table you can have measures like

 

This year = SUM ( Data[Revised closing value] )

 

last year = CALCULATE(SUM ( Data[Revised closing value] ),dateadd('Date'[Date],-1,Year))

 

diff = [This Year]-[Last Year ]
diff % = divide([This Year]-[Last Year ],[Last Year ])

 

 

In date table, you can have month year etc to group data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.