Forum Discussion
neeharikathota
6 years agoFrequent Visitor
Product trend analysis
Hi all , I have to show product SWAP rate analysis based on the launch date per each product . Need to show the total SWAP happened for each product for last n months (4 months , 8 months , ...
Anonymous
6 years agoNot applicable
I don't think you need calculated columns. If you have a product table, hopefully you can a column already in your data with the launch date.
Next you need some measures that will calculate what you need, which can do the time related math based on that date. The measure would be designed to be used in a context where you are displaying information related to products, i.e. a table with each product listed, or a graph with 1 row per product.
Here is a quick example that assumes:
- You have a date table called "Dates" with a date column called "Date"
- You have a product table called "Product" with a column called "LaunchDate"
- You have a SWAP rate measure already
Swap Rate 4 Months= var launchDate = FIRSTDATE('Product'[LaunchDate])
var result = CALCULATE(
[SWAP],
ALL('Dates'),
DATESINPERIOD('Dates'[Date], launchDate, 4, MONTH)
)
RETURN
result
neeharikathota
6 years agoFrequent Visitor
Thanks a lot for the response Anonymous . I will try to implement the SWAP Rate for 4months as suggested by you and get back for any clarifications .
Thanks
Neeharika.