Forum Discussion
Rahulsingh
7 years agoHelper I
Previous Balance Calculation Issue
Hi Everyone, I ran into an interesting issue where I need previous balance from last reported month but PrevoiusBalance DAX won't work because Date reported are not in continuous order. How can ...
- 7 years ago
Hi Rahulsingh,
Based on my test, you could refer to below steps:
Sample data:
Create two measures:
Index = RANKX(ALL(Table1),FIRSTNONBLANK('Table1'[Dates],'Table1'[Dates]),,ASC,Dense)Measure = var a=[Index]-1 return CALCULATE(SUM(Table1[Balance]),FILTER(ALL('Table1'),'Table1'[Index]=a))Result:
You could also download the pbix file to have a view:
https://www.dropbox.com/s/vgkl8c3yf5vccn0/Previous%20Balance%20Calculation%20Issue.pbix?dl=0
Regards,
Daniel He
- 7 years ago
Thank you v-danhe-msft it worked. Thanks a lot
Ashish_Mathur
7 years agoSuper User
Hi,
Share the link from where i can download your PBI file. Please also show the expected result there.