The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I am having trouble creating a measure that adds the number in the Actual column for a particular day plus all of the Actual numbers for the previous 6 days.
|
Hi @Anonymous
Could you please tell me if your problem has been solved? If it is, could you please mark the helpful replies as Answered to close this topic?
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I am still looking for help with the last part of the ask.
You are including the last 6 days in April?
No. Would want to include only the figues for May.
That's not what the data says
Are you still willing to help with this?
Hi,
Are you still able to help with the total sum for seven days for a month? I understand that it doesn't follow the logic previously dicussed. I just need a measure that sums all of the seven days figures for May.<please>
I understand the monthly total of seven days doesn't align with the logic of the seven days measure. The requestor is aware of that.
Hi,
The expected result for the month of May is a total sum of the seven days figures for all of May. See data:
Date | Actual | seven days | % Emergency | ||||
5/1/2024 | 127 | ||||||
5/2/2024 | 105 | ||||||
5/3/2024 | 105 | ||||||
5/4/2024 | 105 | ||||||
5/5/2024 | 105 | ||||||
5/6/2024 | 105 | ||||||
5/7/2024 | 14 | 14 | |||||
5/8/2024 | 43 | 57 | 11% | ||||
5/9/2024 | 16 | 73 | 10% | ||||
5/10/2024 | 63 | 136 | 7% | ||||
5/11/2024 | 90 | 226 | 6% | ||||
5/12/2024 | 64 | 290 | 4% | ||||
5/13/2024 | 84 | 374 | 1% | ||||
5/14/2024 | 16 | 376 | 1% | ||||
5/15/2024 | 333 | ||||||
5/16/2024 | 317 | ||||||
5/17/2024 | 254 | ||||||
5/18/2024 | 164 | ||||||
5/19/2024 | 100 | ||||||
5/20/2024 | 26 | 42 | 0% | ||||
5/21/2024 | 26 | ||||||
5/22/2024 | 8 | 34 | 21% | ||||
5/23/2024 | 34 | ||||||
5/24/2024 | 34 | ||||||
5/25/2024 | 34 | ||||||
5/26/2024 | 34 | ||||||
5/27/2024 | 31 | 39 | 0% | ||||
5/28/2024 | 39 | ||||||
5/29/2024 | 16 | 47 | 6% | ||||
5/30/2024 | 47 | ||||||
5/31/2024 | 47 | ||||||
Total | 3823 | <---------------- | ----------------- | Expected Result |
Thank you. The Seven days measure works perfectly. % Emergency is a measure that I created with the use of "seven days" as a denominator. When I delete "Date" from the report to summarize the % Emergency by month, I get an Infinity error as seven days becomes 0 in the report. How to create a separate seven days measure that will work for my monthly figures?
You cannot measure a measure directly. Either materialize it first, or create a separate measure that implements the entire business logic.
Weeks and months are incompatible.
Is there a measure I can use that has the months and days logic? OR
Is there a separate months measure that I can use? I appreciate your help.
Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.
Here is my sample data:
Date | Actual | seven days |
5/10/2024 | 9 | 63 |
5/11/2024 | 13 | 153 |
5/12/2024 | 13 | 217 |
5/13/2024 | 2 | 282 |
Here is the by date outcome which is working perfectly.
Here is what I need by month:
The seven days figure isn't calculating by month as the seven days measure doesn't calculate for the month.
Now, I see how this would be weird by month. I'll need to get clarification from the requester. This may take a few days. Thank you SO much for your help.
What is your expected outcome?
The last six calendar days or the last six days with data? What should happen for days without data?
Hi,
The last 6 calendar days.