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

Calculate change and change % based on previous date with index item

Hi, I am looking to see if 

IndexPublished DateAvg PriceChange% Change
item 14/5/20231.991-6.705-77.1
item 13/15/20238.6960.2462.91
item 13/14/20238.45-0.208-2.4
item 19/19/20228.6580.0861
item 16/1/20228.572  
item 210/1/20222437.6326.161.08
item 29/1/20222411.47-168.58-6.53
item 28/1/20222580.05-270.26-9.48
item 27/1/20222850.31-422.61-12.91
item 26/1/20223272.92-274.19-7.73
item 25/1/20223547.11314.019.71
item 24/1/20223233.1227.57.57
item 23/1/20223005.6311.0511.54
item 22/1/20222694.5546.811.77
item 21/1/20222647.74-325.69-10.95
item 212/1/20212973.43119.194.18
item 211/1/20212854.24251.769.67
item 210/1/20212602.4897.533.89
item 29/1/20212504.9561.882.53
item 28/1/20212443.07-6.61-0.27
item 27/1/20212449.68  

 

Hi Power BI people,

I would like to see if this is possible. I have a price field (avg price) that I would like to add a change and change % column next to... these should change based on the index name, so if the index name changes, this should restart the calculation for both change and change % so these fields should remain blank for last entry in the table...

 

I have been using Power BI for quite some time but I am unsure if this is possible and would love if anyone could help point me in the right direction.

 

Thanks

1 REPLY 1
amitchandak
Super User
Super User

@Dennisblink , try use offset

 

Offset Previous Day = CALCULATE([Avg Price],OFFSET(-1, ALLselected('Table'[Published Date],'Table'[Index]),ORDERBY('Date'[Published Date]),,partitionBy('Table'[Index])))

 

Continue to explore Power BI Offset Compare Categories, Time Intelligence MOM, QOQ, and YOY: https://youtu.be/5YMlkDNGr0U

 

 

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.