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.
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.
Solved! Go to Solution.
@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
)
)
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.
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 |
@Stachu I have added some annoymized data.
So all I want to do is same day previous weeks.
As I stated earlier
the days in the X axis are always showing just current week, correct? So looking at the report today (22-01-2020), with 3 weeks reference, the chart would be following:
X axis - dates from 16-01-2020 till 22-01-2020
Current week - values for dates 16-01-2020 till 22-01-2020
PreviousWeek - value for 26-12-2019 shown in 16-01-2020 x axis, 27-12-2019 shown in 17-01-2020 x-axis, etc
do I understand it correctly?
X-axis will show the current week with the line trend, that is 17/01/2020 to 23/01/2020, while the other line trend hovering over will show previous week like from 10/01/2020 to 16/01/2020(although this can be for last week, last 2weeks i.e 03/01/2020 to 09/01/2020) etc.
Hope I am clear enough.
Thanks for your input thus far.
@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
)
)
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 |
---|---|
42 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
43 | |
39 | |
33 | |
18 | |
17 |