Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
i had daily sales sent tom me in excel but mtd
so i need to sustract day 2 from day 1 to get real day 2
i need dax formula to subtact with date
can you help
Solved! Go to Solution.
Hi @ossama_ibrahim8 ,
Is this a matrix or a table of data sources?
If it is a data source, it is best to unpivot the date in Power Query and turn the date into a separate column.
Select the Item Code and Item name, click 'Unpivot Other Columns'.
You could get a column of dates and a column of values.
Now you could create the following measure to get the value from previous day.
Previous Value = CALCULATE(SUM('Table'[Value]),FILTER(ALLSELECTED('Table'),[Item Code]=MAX('Table'[Item Code])&&[Attribute]=MAX('Table'[Attribute])-1))
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
n=i need to subtract 3-7-2022 value with items sales from 2-7-2022 value and every day
Hi @ossama_ibrahim8 ,
Is this a matrix or a table of data sources?
If it is a data source, it is best to unpivot the date in Power Query and turn the date into a separate column.
Select the Item Code and Item name, click 'Unpivot Other Columns'.
You could get a column of dates and a column of values.
Now you could create the following measure to get the value from previous day.
Previous Value = CALCULATE(SUM('Table'[Value]),FILTER(ALLSELECTED('Table'),[Item Code]=MAX('Table'[Item Code])&&[Attribute]=MAX('Table'[Attribute])-1))
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ossama_ibrahim8 ,
It's the Power Query Forum. M language is used in it. While dax is used in Power BI Desktop.
And here's the blog teaches you how to get the value from previous row:
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 10 | |
| 6 | |
| 5 | |
| 5 | |
| 3 |