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
RekhaG
Frequent Visitor

Desktop - Tabular Cube - New Measure - Year on Year Cmp

Hi,

 

I am trying to create a new Measure in the Power Bi Desktop for year on year comparison.

 

My source is a tabular SSAS cube. Since a new measure cannot be created through live connection, I am using the other option of importing the fields required.

 

In my Time Dimension, I have a date field that is to be used for creating the new measure. But I keep getting the error message that ' A column specified in the call to function 'PARALLELPERIOD' is not of type DATE. This is not supported.'

 

I am confused as to why it doesnt take a date field as date. I tried using DATEVALUE function and it too didnt work.

The formula I am tried using is 

 

CalcClaimCount = calculate(sum(MyCube[Claim Count]),ParallelPeriod(MyCube[Time Period.Month End],-1,year))

CalcClaimCount = calculate(sum(MyCube[Claim Count]),PREVIOUSMONTH(MyCube[Time Period.Month End]))

 

Any help on this is appreciated.

 

Thanks,

Rekha

1 REPLY 1
v-haibl-msft
Employee
Employee

@RekhaG

 

Please select the column of “Time Period.Month End” and make sure its type is Date as below.

Desktop - Tabular Cube - New Measure - Year on Year Cmp_1.jpg

 

One more thing, we’d better create a Calendar table and related to your table of “MyCube” with Date key when using Time Intelligence Functions.

Desktop - Tabular Cube - New Measure - Year on Year Cmp_2.jpg

 

Desktop - Tabular Cube - New Measure - Year on Year Cmp_3.jpg

 

Best Regards,

Herbert

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.