Latest Data Available over Time Series Dax Measure - powerbi

I have data with the columns "Date","Care Home", "Accumulative Number of Deaths".
Some care homes will miss submissions for certain dates and these will likely never be filled out.
I would like to chart the data in a time series per day where it sums the most recent available values for each day for each care home. This then needs to be filterable by care home.
Completely stuck with it as every attempt I make comes out with a graph that only sums the submissions on that particular day as below. The graph obviously should not decline at any point.
Graph Screen Capture

Related

How do I create banded ranks?

I'm very new to Power BI and have a couple questions that will probably be easy to all of you.
I have a table where each row is an attendance and will have a user id, so multiple rows will have the same user id for a returning user (Table example). I have then created another table from that which gives the number of attendances per user (duplicating the table and then grouping it)
I would now like to categorise those users by top 10% of attenders, 10-20% of attenders such that I can create a graph like the one below (with the y axis being number of total attendances). Any help in how to do this would be greatly appreciated.
Image of ideal graph
The original table of each attendance will also have arrival date and departure date (along with the user id). I would like to find the next instant a user attended and if that arrival date is less than 7 days after the previous departure date, flag it (mark as Y). Once again, I do not know how to do this is power bi/query.
I've spent a large portion of the day trying to figure this out and going at it from a power bi and power query approach and being confused on both. Happy to provide anymore clarifying information anyone would need :)

Summing totals from same date ranges, and getting the range value for those totals

I have the following data currently in PowerBI
This is totals for multiple entities that are under the same location (ID 1).
What I would like to produce is the following
Which is the summation of the 3 totals over time, with start and end dates of when they applied.
I will eventually try to use this to show a trending chart over time for how the totals changed.
Is something like this even possible in PowerBI and/or DAX to first produce the results and then report a trend line like that? The trend line in this example would just have the 3 data points.
The only thing I can think of right now is to extrapolate out each range to 1 day at a time per original screenshots rows, and make the granularity of the chart daily, instead of ranges like this. Then the summation becomes a lot simpler as its just be ID and Date. Only concern is the data volumes that will be produced by extrapolating this out by days like that.

How to add the total of a measure every across a range of date?

EDIT: I added additional information and context in a new post here.
I am trying to figure out what life after pandemic looks like for my firm.
We are currently operating at about 20% capacity for shipping orders. It is expected that those orders will return after the pandemic subsides.
I have a measure that calculates 80% of our backlogged orders. How to add it to the remaining dates of the year in my model? I assume I need to somehow strip the date context and then parse the total out amongst the remaining days...but I don't have the slightest idea how to begin doing that.
I'd like my total to be spread evenly over the next 4 months. Spearing it evenly by an upper limit works, too.
Any ideas?

Count occurrences in time

Working with unemployment data, and I want to count the number of weeks that a client has received benefits during the last 52 weeks.
I have a dataset with many tables which are all connected via the client number in a fact table. In the fact table the client number occurs for every week of the year in one column, another column shows the type of benefits (if any) received in the current week. So I have a long format.
The other two relevant tables contains
A: List of client number appearing only once per client, but no information about benefits received or week number.
B: List of benefits
Tried counting the rows in my fact table while filtering so as only to do so for the specific benefit I am interested in, but I can't make it work so far.
Weeks on benefit A =
CALCULATE(DISTINCTCOUNT(FactDream[DimDreamBorger]);
DimDreamYdelse[dagpenge] = 1)
sample data
I just need a table showing how many weeks the individual client has received a specific benefit, but I keep getting a total sum of the weeks that all the clients have received the benefit.
Best would be if you add the following measure:
=CountRows(YourTable)
Put this measure into a chart visual. Then add a filter visual and put your Benefit column into the filter visual.
This way you can filter after your benefits, which you are interested, and see the result in the chart.

Calculate rates from previous month based on current month in order to make then visually comparable

Maybe this is an easy one but since I’m very new in DAX and PowerBI I can’t figure it out. My database has daily data ranging from MAY/17 to JUN/17 (and it’ll still going in the future). It has information of DATE, DAY, YRMTH (year-month), QT_APRV (approved customers) and QT_TOTAL (total consumers). Sample below (using Excel just to be quicker):
I wanted to create in PowerBI a bar chart with QT_TOTAL per day and a line chart with approved rate of consumer. For the rate, I used:
APPRV_RT = SUM(database[QT_APRV]/SUM(database[QT_TOTAL])
And then, selecting only a month by time in the chart (just like I want), I have:
Perfect, but now I want to create a new line chart, showing the approved rate in each respective day of the last month. Using my example, when june data are select, the first line chart has to show the daily approved rate of june AND the other the approved rate of may, in order to make it comparable (june1 -> may1; june12 -> may12 and so on). Here’s what I want:
How to make this automatically, in order to make each month comparable with the previous? I thought about some DAX formula involving a sum with filtering current month minus 1, I don’t know how to do it.
Any ideas?
UPDATE (07/08/2017)
I tried what Rasmus Dybkjær suggested me, and I thing I'm in the right path.
APPROVED_RATE_PREVIOUS_MONTH = CALCULATE([APPROVED_RATE_CURRENT_MONTH];PARALLELPERIOD(dCalendario[DataBase];-1;MONTH))
However, it returned the approved rate from the previous month as a whole (67,0% in May), not each day as I wanted:
Any suggestions?
You should be able to use the DAX function called PARALLELPERIOD() for this purpose. The PARALLELPERIOD() function takes a date column and shifts it a number of periods back or forward.
For example, you could use it like this to calculate your approved rate shifted one month back:
ApprovedRateLM =
CALCULATE(
DIVIDE(
SUM(database[QT_APRV]),
SUM(database[QT_TOTAL])
),
PARALLELPERIOD(database[Date],-1,month)
)
Note that it is important that your [Date] column contains a date type. Otherwise the PARALLELPERIOD function will not work.