Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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.
@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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
85 | |
66 | |
51 | |
45 |
User | Count |
---|---|
216 | |
89 | |
82 | |
66 | |
57 |