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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
buithai108
Frequent Visitor

Value related to next date

Hello,

 

Im new to Power BI, I would like to find the value next month time on the same case

I'm building a report from the data like below:

 

NameTemp ValuePrev ValueDate
01/01/2019A 8,154,159
02/01/2019A 8,440,583
03/01/2019A5,467,6875,343,627
01/01/2020A 10,862,462
02/01/2020A 6,470,157
03/01/2020A 6,250,878
01/01/2021A187,84521,960,681
02/01/2021A 8,718,120
03/01/2021A 5,993,100
01/01/2022A 12,234,775
02/01/2022A 9,988,616
03/01/2022A6,745,9049,733,571
01/01/2020B 4,513,172
02/01/2020B 3,609,276
03/01/2020B 2,075,878

 

THE EXPECTED OUT PUT IS

buithai108_0-1670296794857.png

 

I have tried with the calculate and the lookupvalue function without any luck.

Hope that someone can be of help! 

 

Best regards

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@buithai108 , Try like

 

new column

next day = sumx(filter(Table, [Name] = earlier([Name]) && [Date] = earlier([Date])+1 ),[Prev Value])

Previous year same day =
var _day = date(year([Date])-1, month([Date]),1)
return
sumx(filter(Table, [Name] = earlier([Name]) && [Date] = _day ),[Prev Value])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

2 REPLIES 2
buithai108
Frequent Visitor

Wonderful, thanks!

amitchandak
Super User
Super User

@buithai108 , Try like

 

new column

next day = sumx(filter(Table, [Name] = earlier([Name]) && [Date] = earlier([Date])+1 ),[Prev Value])

Previous year same day =
var _day = date(year([Date])-1, month([Date]),1)
return
sumx(filter(Table, [Name] = earlier([Name]) && [Date] = _day ),[Prev Value])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.