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

Same calculated column in Power Pivot and PBI, different result

Hi All

my table in power pivot is (and the data that I'm expecting....)

DatePrev Date (calculated column)
3/08/1984 
4/08/19843/08/1984
5/08/19844/08/1984
9/08/19845/08/1984
10/08/19849/08/1984

The calculated column's code is

 

=CALCULATE(MAX(Table1[Date]),FILTER(Table1,EARLIER(Table1[Date])>Table1[Date]))

 

 Similar table in Power BI is

DatePrev Date (calculated column)
03/08/1984 
06/08/198403/08/1984
07/08/198406/08/1984
08/08/198407/08/1984
15/08/198414/08/1984

This calculated column code is 

 

Prev Date = CALCULATE(MAX(aord[Date]),FILTER(aord,EARLIER(aord[Date])>aord[Date]))

 

 Why the difference ?

tks Russell

1 ACCEPTED SOLUTION
Nathaniel_C
Community Champion
Community Champion

Hi @russtak ,
Well, for one thing, the first column is different in the two scenarios. We would really need to see the underlying tables to go further.


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





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

Proud to be a Super User!




View solution in original post

3 REPLIES 3
Nathaniel_C
Community Champion
Community Champion

Hi @russtak ,
Well, for one thing, the first column is different in the two scenarios. We would really need to see the underlying tables to go further.


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





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

Proud to be a Super User!




Hi @Nathaniel_C

The difference in the data in the 'Date' column is irrelevant, I wanted to show that the 'Prev Date' field  for the 5th row in the PBI table  is incorrect should be showing 08/08/1984 and not 14/08/1984. In any case to demo it properly I changed the data in the power pivot query  to align with power bi.

Power Pivot Data below, 5th record shows correct Prev Date as 8/08/1984

 

DatePrev Date
3/08/1984 
6/08/19843/08/1984
7/08/19846/08/1984
8/08/19847/08/1984
15/08/19848/08/1984

Hi @Nathaniel_C 

 

Noob issue my csv data was dodgy, thanks for your help

 

tks R

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.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.