Forum Discussion
deduct amount from previous selected value in a table
hi all,
I am downloading regularly a report from our project tracking system. For every project I can see what is the expected spend for the next months. When comparing snapshots I can see if projects are in delay or changing their spend. Below is a report that I have created so far.
Now I want to create a measure that deducts the value of the last snapshot from the previous on. But I want to make it in a way that the user can select the snapshot themselves. So for example if user wants to see snapshot only from 06/03/2025 with the one for 11/01/2025 that should be possible. So I would need a function that can see the previous line snapshot and use that as a filter in a variable. Could you do this with a window function or the offset function?
Thankyou, FBergamaschi, for your response.
Hi fjjpeeters1976,
We appreciate your question on the Microsoft Fabric Community Forum.
Based on my understanding of the issue, please find attached the screenshots and a sample PBIX file that may assist in resolving the matter:
We hope the information provided helps to resolve the issue. Should you have any further queries, kindly feel free to contact the Microsoft Fabric community.
Thank you.
10 Replies
- FBergamaschi
Super User
Please include, in a usable format, not an image, a small set of rows for each of the tables involved in your request and show the data model in a picture, so that we can import the tables in Power BI and reproduce the data model. The subset of rows you provide, even is just a subset of the original tables, must cover your issue or question completely. Do not include sensitive information and do not include anything that is unrelated to the issue or question. Please show the expected outcome based on the sample data you provided and make sure, in case you show a Power BI visual, to clarify the columns used in the grouping sections of the visual.
Need help uploading data? click here
Want faster answers? click here
- fjjpeeters1976
Helper III
SnapshotProjectMonthAmount 04 January 2025 Project A 01 January 2025 5 04 January 2025 Project A 01 February 2025 10 04 January 2025 Project A 01 March 2025 15 04 January 2025 Project A 01 April 2025 15 04 January 2025 Project A 01 May 2025 20 04 January 2025 Project A 01 June 2025 5 04 January 2025 Project A 01 July 2025 30 04 January 2025 Project A 01 August 2025 3 04 January 2025 Project A 01 September 2025 44 04 January 2025 Project A 01 October 2025 22 04 January 2025 Project A 01 November 2025 5 04 January 2025 Project A 01 December 2025 12 04 January 2025 Project A 01 January 2026 15 04 January 2025 Project A 01 February 2026 23 04 January 2025 Project A 01 March 2026 11 04 January 2025 Project A 01 April 2026 5 04 January 2025 Project A 01 May 2026 10 04 January 2025 Project A 01 June 2026 15 04 January 2025 Project A 01 July 2026 15 04 January 2025 Project A 01 August 2026 20 04 January 2025 Project A 01 September 2026 5 04 January 2025 Project A 01 October 2026 14 04 January 2025 Project A 01 November 2026 22 04 January 2025 Project A 01 December 2026 20 04 January 2025 Project A 01 January 2027 14 11 January 2025 Project A 01 January 2025 5 11 January 2025 Project A 01 February 2025 11 11 January 2025 Project A 01 March 2025 10 11 January 2025 Project A 01 April 2025 15 11 January 2025 Project A 01 May 2025 15 11 January 2025 Project A 01 June 2025 20 11 January 2025 Project A 01 July 2025 15 11 January 2025 Project A 01 August 2025 20 11 January 2025 Project A 01 September 2025 20 11 January 2025 Project A 01 October 2025 11 11 January 2025 Project A 01 November 2025 5 11 January 2025 Project A 01 December 2025 14 11 January 2025 Project A 01 January 2026 22 11 January 2025 Project A 01 February 2026 20 11 January 2025 Project A 01 March 2026 14 11 January 2025 Project A 01 April 2026 5 11 January 2025 Project A 01 May 2026 11 11 January 2025 Project A 01 June 2026 10 11 January 2025 Project A 01 July 2026 2 11 January 2025 Project A 01 August 2026 3 11 January 2025 Project A 01 September 2026 5 11 January 2025 Project A 01 October 2026 4 11 January 2025 Project A 01 November 2026 10 11 January 2025 Project A 01 December 2026 15 11 January 2025 Project A 01 January 2027 15 11 April 2025 Project A 01 January 2025 20 11 April 2025 Project A 01 February 2025 5 11 April 2025 Project A 01 March 2025 6 11 April 2025 Project A 01 April 2025 7 11 April 2025 Project A 01 May 2025 8 11 April 2025 Project A 01 June 2025 5 11 April 2025 Project A 01 July 2025 9 11 April 2025 Project A 01 August 2025 11 11 April 2025 Project A 01 September 2025 12 11 April 2025 Project A 01 October 2025 13 11 April 2025 Project A 01 November 2025 2 11 April 2025 Project A 01 December 2025 5 11 April 2025 Project A 01 January 2026 2 11 April 2025 Project A 01 February 2026 2 11 April 2025 Project A 01 March 2026 2 11 April 2025 Project A 01 April 2026 10 11 April 2025 Project A 01 May 2026 15 11 April 2025 Project A 01 June 2026 15 11 April 2025 Project A 01 July 2026 20 11 April 2025 Project A 01 August 2026 1 11 April 2025 Project A 01 September 2026 5 11 April 2025 Project A 01 October 2026 14 11 April 2025 Project A 01 November 2026 22 11 April 2025 Project A 01 December 2026 20 11 April 2025 Project A 01 January 2027 14 25 July 2025 Project A 01 January 2025 5 25 July 2025 Project A 01 February 2025 11 25 July 2025 Project A 01 March 2025 10 25 July 2025 Project A 01 April 2025 20 25 July 2025 Project A 01 May 2025 2 25 July 2025 Project A 01 June 2025 2 25 July 2025 Project A 01 July 2025 2 25 July 2025 Project A 01 August 2025 2 25 July 2025 Project A 01 September 2025 10 25 July 2025 Project A 01 October 2025 15 25 July 2025 Project A 01 November 2025 15 25 July 2025 Project A 01 December 2025 20 25 July 2025 Project A 01 January 2026 2 25 July 2025 Project A 01 February 2026 14 25 July 2025 Project A 01 March 2026 22 25 July 2025 Project A 01 April 2026 20 25 July 2025 Project A 01 May 2026 14 25 July 2025 Project A 01 June 2026 5 25 July 2025 Project A 01 July 2026 11 25 July 2025 Project A 01 August 2026 10 25 July 2025 Project A 01 September 2026 5 25 July 2025 Project A 01 October 2026 3 25 July 2025 Project A 01 November 2026 8 25 July 2025 Project A 01 December 2026 99 25 July 2025 Project A 01 January 2027 5
- fjjpeeters1976
Helper III
- FBergamaschi
Super User
Thanks
I need the timetable too and an image showing what exactly you want me to calculate, show me an example please
Thanks
- fjjpeeters1976
Helper III
Hi, any regular timetable will do, nothing fancy here. I cannot add the table as it exceeds the 20k characters. Regarding the outcome, please see below example. Basically I want to be able to compare one snapshot with another and see the changes. User can select which and how many snapshots they want to see. Both options below basically have the same issue, how can I create a dax measure that looks at the previous snapshot in the matrix. There is no defined logic in the snapshots, so I cannot use a dateadd function or an indexnumber to go to the next or previous snapshots.
- v-pnaroju-msft
Community Support
Thankyou, FBergamaschi, for your response.
Hi fjjpeeters1976,
We appreciate your question on the Microsoft Fabric Community Forum.
Based on my understanding of the issue, please find attached the screenshots and a sample PBIX file that may assist in resolving the matter:
We hope the information provided helps to resolve the issue. Should you have any further queries, kindly feel free to contact the Microsoft Fabric community.
Thank you.
- fjjpeeters1976
Helper III
hi, thanks for your reply. It is not exactly what I needed but it got me into the right direction. I know figured out how to do it and using the ALLSELECT function was what made it work.
- v-pnaroju-msft
Community Support
Hi fjjpeeters1976,
We would like to follow up and see whether the details we shared have resolved your problem.
If you need any more assistance, please feel free to connect with the Microsoft Fabric community.
Thank you. - v-pnaroju-msft
Community Support
Hi fjjpeeters1976,
We are following up to see if what we shared solved your issue. If you need more support, please reach out to the Microsoft Fabric community.
Thank you. - v-pnaroju-msft
Community Support
Hi fjjpeeters1976,
We wanted to see if the information we gave helped fix your problem. If you need more help, please feel free to contact the Microsoft Fabric community.
Thank you.