Forum Discussion
dmimp
1 year agoFrequent Visitor
Calculate difference between Amount based on most recent and least recent date
Hello, I export event sales monthly on our clients (12 tables, combined using Append). Each table has a "name" key column. From there, I have several Amount columns. I want to show the change ...
- 1 year ago
Small edits and it worked! Thank you SO MUCH!!!!
------
UpsellTotal =VAR SelectedName = SELECTEDVALUE('Merge1'[Name])VAR FirstEvent =CALCULATE(MAX('Merge1'[Event Actual]),TOPN(1,FILTER('Merge1', 'Merged Data (2)'[Name] = SelectedName &&NOT(ISBLANK('Merge1'[Event Actual]))),'Merge1'[Export Date].[Date], ASC))VAR LastEvent =CALCULATE(MAX('Merge1'[Event Actual]),TOPN(1,FILTER('Merge1', 'Merge1'[Name] = SelectedName && NOT(ISBLANK('Merge1'[Event Actual]))),'Merge1'[Export Date].[Date], DESC))RETURNLastEvent - FirstEvent
Anonymous
1 year agoNot applicable
Hi dmimp,
Thank you for reaching out to the Microsoft Fabric Forum Community.
.
Could you please share a sample of your data in text or table format , along with the expected outcome based on that sample?
Thank you & best regards,
Prasanna Kumar