Forum Discussion
Weekly growth in trend
- Anonymous2 years ago
Thanks for the reply from adudani and NordicDrow.
Hi logan_logan ,
1.Change date to week of year in Power Query Editor:
2.Create simple measures:
WeeklySales = CALCULATE(SUM([Sales]), ALLEXCEPT('Table', 'Table'[Week of Year],'Table'[Product]))WeeklyGrowth = VAR CurrentWeekSales = CALCULATE(SUM([Sales]), ALLEXCEPT('Table', 'Table'[Week of Year],'Table'[Product])) VAR PreviousWeekSales = CALCULATE('Table'[WeeklySales], 'Table'[Week of Year]= MAX('Table'[Week of Year]) - 1) RETURN IF(NOT ISBLANK(PreviousWeekSales), (CurrentWeekSales - PreviousWeekSales) / PreviousWeekSales, BLANK())3. Sort by week of year:
4. The result is as follows:
I can't reproduce your problem based on my tests, can you provide some more specific descriptions and screenshots as well as the dax formula you're using, it will help the problem to be solved more quickly.
Best Regards,
Zhu
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi logan_logan ,
kindly provide a sample input and output masking sensitive data.
Would have to look at the data. typically a date dimension on a daily granuarilty related to the fact table, along with a dateadd measure provides the result.
i have shared the test file.