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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
RekhaG
Frequent Visitor

Previous Year - Measures - Non Contiguous Date Selection

I have created Previous Year Measure using different formulas(in Tabular SSAS Cube) as below:

but when I select them in PowerBI for non-contiguous months, nothing shows up, the service keeps shwoing 'In Progress' circle

 

PrevYear:=CALCULATE (sum( 'Table'[Column]), SAMEPERIODLASTYEAR( 'Time Period'[Month End]))

 

PrevYear:=sumx('TableName',CALCULATE([Column], DATEADD('Time Period'[Month End],-1,Year)))

 

Any help on this is appreciated.

 

Thanks.

1 ACCEPTED SOLUTION

Thanks Bhavesh.

 

The formula below worked for me

 

PrevYear:=CALCULATE(sum('Table'[Column]), PARALLELPERIOD('DateTable'[Date],-12,MONTH))

View solution in original post

2 REPLIES 2
BhaveshPatel
Community Champion
Community Champion

Hi Rekha

 

Please try these measures for previous year calculation. Make sure you have a date table in your data model.

 

PrevYear:=CALCULATE(SUM(Table[Column]),DATEADD('Date'[Date],-1,YEAR))

 

OR

 

PrevYear:=CALCULATE(SUM(Table[Column]),SAMEPERIODLASTYEAR('Date'[Date]))

 

Thanks & Regards,

Bhavesh

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

Thanks Bhavesh.

 

The formula below worked for me

 

PrevYear:=CALCULATE(sum('Table'[Column]), PARALLELPERIOD('DateTable'[Date],-12,MONTH))

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.