Forum Discussion
Same day Previous week
| tbl_dt | btx | clp | lwp |
| 11/9/2019 | 890 | 34 | 55 |
| 11/10/2019 | 232 | 142 | 159 |
| 11/11/2019 | 4455 | 127 | 170 |
| 11/12/2019 | 433 | 113 | 133 |
| 11/13/2019 | 3456 | 158 | 69 |
| 11/14/2019 | 445 | 107 | 38 |
| 11/15/2019 | 33 | 66 | 171 |
| 11/16/2019 | 8767 | 31 | 113 |
| 11/17/2019 | 76665 | 158 | 125 |
| 11/18/2019 | 665 | 101 | 118 |
| 11/19/2019 | 6778 | 107 | 129 |
| 11/20/2019 | 544656 | 79 | 71 |
| 11/21/2019 | 6664455 | 101 | 30 |
| 11/22/2019 | 55556 | 52 | 137 |
| 11/23/2019 | 77877 | 29 | 124 |
| 11/24/2019 | 77878 | 127 | 137 |
| 11/25/2019 | 55667 | 114 | 135 |
| 11/26/2019 | 5667 | 100 | 115 |
| 11/27/2019 | 5688 | 98 | 59 |
| 11/28/2019 | 88988 | 96 | 24 |
| 11/29/2019 | 7776 | 51 | 183 |
| 11/30/2019 | 7898 | 43 | 121 |
| 12/1/2019 | 6777 | 131 | 116 |
| 12/2/2019 | 66789 | 87 | 110 |
| 12/3/2019 | 78887 | 34 | 94 |
| 12/4/2019 | 677 | 49 | 62 |
| 12/5/2019 | 6776 | 84 | 31 |
| 12/6/2019 | 994 | 56 | 128 |
| 12/7/2019 | 55444 | 37 | 133 |
| 12/8/2019 | 4454 | 88 | 107 |
| 12/9/2019 | 66666 | 89 | 137 |
| 12/10/2019 | 66767 | 38 | 229 |
| 12/11/2019 | 6554 | 19 | 767 |
| 12/12/2019 | 5667 | 128 | 3334 |
| 12/13/2019 | 6655 | 91 | 323 |
| 12/14/2019 | 5566 | 91 | 2334 |
| 12/15/2019 | 7666 | 88 | 55 |
| 12/16/2019 | 6666 | 105 | 667 |
| 12/17/2019 | 66776 | 54 | 445 |
| 12/18/2019 | 76776 | 19 | 556 |
| 12/19/2019 | 77666 | 128 | 887 |
| 12/20/2019 | 6677 | 109 | 766 |
| 12/21/2019 | 5665 | 121 | 877 |
| 12/22/2019 | 5544 | 109 | 89 |
So I want to show a line graph with it, where the x-axis would be holding the dates and the values on y-axis with two lines. One line will be trending for the current week and the other line should be for any past week selected(I want in a suitation whereby I can select any past week, it can 4weeks back or 2weeks or 3weeks etc and see the trend of what we have for that week as compared to the current week). I don't know if there is a better way you think this could b achieved.
Thank you very much.
Anonymous actually measure used by Mariusz will work for you if you add minus for the day offset (here adjusted for your table)
Measure = CALCULATE( SUM( 'Table'[lwp] ), DATEADD( 'Table'[tbl_dt], - MAX( 'Week Slicer'[Week No] ) * 7, DAY ) )
7 Replies
- Mariusz
Community Champion
Hi Anonymous
Please see the attached file with a solution.
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.- AnonymousNot applicable
Hi
I can see that you are suming the values.
I don't want to sum the values, I want in a way whereby I select a day, it will show me the trend values for each day for that week, and also show me the values that we have for those days previous week.
- Stachu
Community Champion
Can you add sample tables (in format that can be copied to PowerBI) from your model with anonymised data? Like this (just copy and paste into the post window).
Column1 Column2 A 1 B 2.5