Forum Discussion
Compare Column with previous row and repeat the loop
Hi Team,
Please find the data below ,need to create a new measure which will show
1)same as orders if the date is start of month
2)compare the month start with previous row from orders.
Commens column in screenshot has the formula for the calculation
Hi Anonymous
Please find the below measure for your reference.
a1 = CALCULATE(SUM(Sheet1[Amount]), PREVIOUSDAY(Sheet1[DD]))sales = SUM(Sheet1[Amount])a2 = [sales]-[a1]Thanks
4 Replies
- davehus
Memorable Member
Hi Anonymous ,
Please see attached solution, most of the steps are done in power query. Hopefully it helps.
Did I help you today? Please accept my solution and hit the Kudos button.
- AnonymousNot applicable
Hi davehus ,the expected output is different from what is shared by you.
Need this to be resolved in Dax not in Power Query.
In your example ,displaying previous row value.
But in my requirtment current date order to be minus with previous day output.Please refer the screenshot above for reference.
- Shreeram04
Resolver III
Hi Anonymous
Please find the below measure for your reference.
a1 = CALCULATE(SUM(Sheet1[Amount]), PREVIOUSDAY(Sheet1[DD]))sales = SUM(Sheet1[Amount])a2 = [sales]-[a1]Thanks
- AnonymousNot applicable
amitchandak could you please help me on this