Forum Discussion
WEEK VARIATION
Hi Miguelcrz ,
Can you create a new column with below DAX:
Last Calendar Week Sales = CALCULATE( [Total Sales], 'Calendar'[Week Number] = WEEKNUM(TODAY(),1) -1 )
Use this to create another calculated column for % variation with below DAX:
Percent_Variation = (([Total Sales]-[Last Calendar Week Sales])/[Last Calendar Week Sales])*100
Give a thumbs up if this post helped you in any way and mark this post as solution if it solved your query !!!
Hi @Anand24 @amitchandak @v-shex-msft @FrankAT ! is not working. I only have the column week and the column sales. I have to calculate or do a new column to calculate the sales from last week but i dont know how. Then i need to calculate the variation between the sales of this week vs last week.
Thanks!
- FrankAT6 years agoCommunity Champion
Hi Miguelcrz
here is another solution to your question. Use the three measures below.
Regards FrankAT
- Anonymous5 years agoNot applicable
Hi Miguelcrz,
You told us these codes not works without any detailed information, they not help to resolve your scenario and hard to clarify/troubleshoot the issues.
Can you please provide a pbix file with dummy data and formulas to test? I think it should help for testing the coding formula on your sample data. (remove sensitive data before share)How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng