- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Accessing Previous records!
Hello Everyone!
Scenario
Here is my situation. I have a table/view that records every transaction. In Power BI I have aggregated the table to show summary for each day for last 8 days. I have a requirement to compute the growth in total consultations by comparing the total consultation for a specific date for example Sep 7, 2018 to the total consultation on the date which was 1 week before the specific date i.e., Aug 31, 2018
The growth is calculated by the formula:
(Total consultations for current date - Total consultations for Last weeks date)/(Total consultation for last weekdate)
Problem
I can access the current total consultations as it is the current record. But having a hard time trying to access the last week consultations.
What I am looking for is something to let me access the records based on a date condition.
Something that would
1. take current record date - 7 days,
2. use this date as a filter to apply on whole table,
3, get the records that match this date
4. and sum the total consultation for this records.
Now number 2 and 3 are the issue that I am unable to solve. I would apprecitate if anyone can point me in the right direction.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@habibsyed01,
I make a test using the sample table below. And create the following columns.
Index = RANKX(FILTER(Table3,Table3[Date]<EARLIER(Table3[Date])),Table3[Date],,ASC,Dense)
last 7 days value = CALCULATE(SUM(Table3[Value]),FILTER(Table3,Table3[Index]=EARLIER(Table3[Index])-7))
If the above DAX don't help, please share sample data of your table that can be copied and pasted here. Also post expected result in the forum.
Regards,
Lydia
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
03-07-2025 09:06 AM | |||
02-25-2025 05:40 AM | |||
05-03-2024 08:48 AM | |||
12-27-2024 02:01 AM | |||
01-16-2025 07:51 AM |
User | Count |
---|---|
140 | |
110 | |
81 | |
60 | |
46 |