Forum Discussion
gabrielvigo
Helper I
6 years agoShow Current and Last Week values into chart
Hi all I have a table with three fields. "week_report","week_incident_open" and "value". I need show into a bar chart a SUM(value) of the SELECTEDVALUE(week_report). When "week_incident_open" is...
mahoneypat
Microsoft Employee
6 years agoIn this case, less may be more. Please try this one. If not, please paste the values from your image so I can try it out directly.
med_value_lastwwek =
VAR LastWeekDate = SELECTEDVALUE(TB_SERVICE_SNAPSHOT[week_report])-7
RETURN
CALCULATE(SUM(TB_SERVICE_SNAPSHOT[value]);TB_SERVICE_SNAPSHOT[week_report] = LastWeekDate)
This way, you are only replacing the filter on [week_report].
Regards,
Pat
gabrielvigo
Helper I
6 years agoThat measure didn't work for me.
I copy a table with the sample data.
| week_report | week_incident_open | value |
| 6/4/2020 | 23/12/2019 | 4 |
| 6/4/2020 | 10/2/2020 | 1 |
| 6/4/2020 | 9/3/2020 | 1 |
| 6/4/2020 | 30/3/2020 | 2 |
| 13/4/2020 | 3/2/2020 | 1 |
| 13/4/2020 | 9/3/2020 | 1 |
| 13/4/2020 | 30/3/2020 | 1 |
| 13/4/2020 | 6/4/2020 | 2 |
| 20/4/2020 | 3/2/2020 | 1 |
| 20/4/2020 | 9/3/2020 | 1 |
| 20/4/2020 | 30/3/2020 | 3 |
| 20/4/2020 | 13/4/2020 | 1 |
| 20/4/2020 | 20/4/2020 | 2 |
| 27/4/2020 | 9/3/2020 | 1 |
| 27/4/2020 | 30/3/2020 | 1 |
| 27/4/2020 | 27/4/2020 | 9 |
I copy a table with the sample data. I hope you can help me. 🙂