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.
I have 2 tables: Date and Cases which is daily detail of the cases coming in daily.
I would like a simple line chart to show weekly comparison with the past 7 days and a line comparing the previous 7 days.
This would be whatever I'm measuring-total cases opened, closed, by team, closure time, etc.
Need help with the measures to do this, nothing I'm trying is working. Someone previously gave me total for prev week but this is not what I needed. I wanted daily (like below).
Date | Case closure time (days) this week | Case closure time (days) previous Week |
Saturday, October 27, 2018 | 5 | |
Sunday, October 28, 2018 | 6 | |
Monday, October 29, 2018 | 8 | |
Tuesday, October 30, 2018 | 4 | |
Wednesday, October 31, 2018 | 5 | |
Thursday, November 1, 2018 | 3 | |
Friday, November 2, 2018 | 2 | |
Saturday, November 3, 2018 | 32 | 5 |
Sunday, November 4, 2018 | 24 | 6 |
Monday, November 5, 2018 | 19 | 8 |
Tuesday, November 6, 2018 | 80 | 4 |
Wednesday, November 7, 2018 | 50 | 5 |
Thursday, November 8, 2018 | 54 | 3 |
Friday, November 9, 2018 | 43 | 2 |
Saturday, November 10, 2018 | 1 | 32 |
Sunday, November 11, 2018 | 2 | 24 |
Monday, November 12, 2018 | 3 | 19 |
Tuesday, November 13, 2018 | 1 | 80 |
Wednesday, November 14, 2018 | 50 | |
Thursday, November 15, 2018 | 54 | |
Friday, November 16, 2018 | 43 | |
Saturday, November 17, 2018 | 1 | |
Sunday, November 18, 2018 | 2 | |
Monday, November 19, 2018 | 3 | |
Tuesday, November 20, 2018 | 1 |
@electrobrit Please try this as a "New Column"
CaseClosurePrevWeek = LOOKUPVALUE(Test79PrevDay[CaseClosureThisWeek],Test79PrevDay[Date],DATEADD(Test79PrevDay[Date],-7,DAY))
Proud to be a PBI Community Champion
Thank you @PattemManohar. One issue, I don't know how to solve. My case closure time is in the cases table 'duration_days'
Using your calc column-i used this below
CaseClosurePrevWeek = LOOKUPVALUE(VW_Cases[Duration_Days], 'Date'[Date],DATEADD('Date'[Date],-7,DAY))
I am getting this message
A table of multiple values was supplied where a single value was expected.
What am I doing wrong?
Thanks again!
Proud to be a PBI Community Champion
@PattemManohar I like what you did though. My original data table I was showing what I wanted to be able to get to in the solution. Sorry about that.
They are 2 different tables. I have a date table and the case table and have related them.
Proud to be a PBI Community Champion
@PattemManohar thank you so much, sorry for being vague. Maybe this is why I'm having trouble with this calculation!
I have a date table and a case table with with a date (Date of Case Creation) which is how the tables are related
DateTable(Date) and CaseTable(CaseCreated)
So you are saying to just use that CaseCreated date?
Proud to be a PBI Community Champion
CaseClosurePrevWeek=LOOKUPVALUE(VW_Cases[Duration_Days],VW_Cases[CaseCreatedOn],DATEADD(VW_Cases[CaseCreatedOn],-7,DAY))
getting the same error. "A table of multiple values was supplied where a single value was expected".
any thoughts and thanks, you've been helpful!!!
Proud to be a PBI Community Champion
it would have duplicate values because multiple cases are created on any given date. I apologize that table is confusing, that's not the data, it was to conceptualize the result I needed.
Any thoughts on going back to using the DATE table, this contains no dups. OR SUGGESTIONS?
@PattemManohar
Proud to be a PBI Community Champion
@PattemManohar
I can't thank you enough. I'm sure I'm learning something big here but I have spent so much time and still no avail.
Attached or via link is a sample pbix report with similar data.
Sample pbix
Again, thank you in advance.
am I missing something in DurationDays? this is how long a case is open.
I can't figure out what to do.
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 |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |