Forum Discussion
Calculate values from Previous month & SPLY (Power Query)
Hi Community,
I am trying to calculate the Product's Price from the previous month & the same period previous year in the structure below
----------------------------------------------------
Category | SubCategory | Product | Date | Price
----------------------------------------------------
I successed calculating those values using DAX Measure, but I am wondering that can be done using Power Query even before loading data.
Any feedback would be appreciated.
Thank you in advance.
3 Replies
- lbendlin
Super User
Yes, it can be done in Power Query, but it is much easier to do as a DAX measure. (Plus, when you do it in Power Query you are stuck with the result, and it won't change if you change filters)
- DataVitalizer
Super User
Hi lbendlin
I am trying to minimize the use of CPU at query time that's why I thought of using Power Query to precaclulate the value and get it stored in the report file. Can it be done using a calculated column instead of measure?
Thank you in advance
amitchandak Greg_Deckler
- lbendlin
Super User
As I mentioned, you need to judge if that value is immutable or if it can be impacted by user interactions ( like adjusting for inflation). There is no substantial difference between calculated columns and power query.