Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hello everybody, i faced a problem for creating a new metrics that displays the compations between this year and the previous year but on the same day of the week and the same week of the year. For example i should compare 'Tuesday, week-33, 2023' with 'Tuesday, week-33, 2022'. How i can create using dax 'Tuesday, week33, 2022'?
Thank you for everything.
Solved! Go to Solution.
I found the solution:
I found the solution:
Thank you very much for you time, but i faced another kind of problem. I should compare the sales of "tuesday 21th june 2022" with the sale of "tuesday 20th june 2023" so the same day of the week (tuesady) and the same week of the year (25th week of the year over 52). My problem is: how can i obtain "tuesday 21th june 2022"?
You can reference your previous year measure you just created and do the same thing with dateadd().
Last year Sales + one day = CALCULATE([Last year Sales],DATEADD('Date Table'[Date],1,day))
You can use the dateadd function. A quick example that will get your sales from last year...
Last year Sales = CALCULATE(SUM('Table'[Sales]),DATEADD('Date Table'[Date],-1,year))
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
115 | |
112 | |
105 | |
95 | |
58 |
User | Count |
---|---|
174 | |
147 | |
136 | |
102 | |
82 |