Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello All!!!
I've looked around a bit and haven't had much luck finding help on this.
I have 2016 and 2017 Sales Data. I have InvoiceDate and Sales as my main columns. I'd like to be able to compare say Weekend Ending 3-25-17 to the comprabable Week Ending in 2016, which is 3-26-16. I am able to figure out how to get Week Number but I haven't been able to figure out a good way to use SamePeriodLastYear by week number. Or can I even use that?!?!
Any suggestions/help/advice would be greatlly appreciated!
Thanks!
R
Solved! Go to Solution.
Build your calculations for this year and for last year. Then create a growth calculation: This year - Last Year.
After you create the totals it is a simple matter to put week numbers on rows or on the axis.
Total Sales = SUM(Sales[Line Sales])
Last Year Sales = CALCULATE([Total Sales], DATEADD(Date[Datekey], -1, year))
Growth = [Total Sales]-[Last Year Sales]
Make sure your report/page is filtered to the current year for the last year calculation to work. Then, if you would like, you can use your weeknumber as a filter as well. For example this week I would set my week number filter to be less than 15.
Proud to be a Super User!
Hi @RAdams
Please check out the link
https://www.sqlbi.com/articles/week-based-time-intelligence-in-dax/
If it works for you please accept this as a solution and also give KUDOS.
Cheers
CheenuSing
@CheenuSing Thanks for taking the time to share the link. I looked through a couple times and I'm still a bit confused.
Should I use filters to compare Previous and Current Years? If so, how do I use Week Numbers in the filters?
Thanks again for your time.
R
Build your calculations for this year and for last year. Then create a growth calculation: This year - Last Year.
After you create the totals it is a simple matter to put week numbers on rows or on the axis.
Total Sales = SUM(Sales[Line Sales])
Last Year Sales = CALCULATE([Total Sales], DATEADD(Date[Datekey], -1, year))
Growth = [Total Sales]-[Last Year Sales]
Make sure your report/page is filtered to the current year for the last year calculation to work. Then, if you would like, you can use your weeknumber as a filter as well. For example this week I would set my week number filter to be less than 15.
Proud to be a Super User!
Awesome. A simple explanation is all I needed! I was way over complicating it!
R
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |