Power BI visualization of data with a Start and End date - powerbi

THis is an example of what I think i need to do
I would like to ask some modeling advise I cannot solve myself:
I am using Power BI to visualize the time machinery is out of order.
The source is a register of equipment not functioning, with a start date and end date (note that there is no end date if the machine is not fixed yet).
I would like to show the time (hours, percentage, etc) that the machinery is out of order, filter for a specific period /date (e.g. month).
So I have 2 date columns: ‘’Start out of order’’ and ‘’Back in order’’
I do have a date table, which I usually would connect to all the date variables. However, since I am working with a Start and End date. This does not give the result I am looking for.
Any help is very much appreciated!
Kind regards,
Link to my Power BI FILE:
https://wetransfer.com/downloads/83ca3850392967d0d42a5cc71f4352c420200213160932/eb7353
Stijn

I am not sure how you would like to visualise your data, but this is what I managed to do:
create a daysdiff column with
Daysbetween = IF(ISBLANK(TF_Eventos
[End out of order]);DATEDIFF(TF_Eventos[Start out of
order];TF_Eventos[TODAY];HOUR);DATEDIFF(TF_Eventos
[Start out of order];TF_Eventos[End out of order];HOUR))
This creates your column to check difference between Dates.
Then create a separate column with your Date. In this case I copied the Start out of order date, since I thought you might wanted to be able to filter for the start dates. Then simply create a relationship between your newly created Date column and your start out of order date.
Doing so lets you create a visual with the daysbetween (in this case portrayed in hours) and your start dates. Now just simply add a slicer and you can filter on date.
Hope this helps

Related

power BI relative date filter

Relative Date Functionality in Power BI:
Issue #1:
Hi Team,
Need to know is there any way to implement the below relative date filter functionality in Power BI
Please note the following:
For year the base year should be current year, for now it should be 2021
For month the base month should be current month, for now it should be july and so on.
Issue#2:
Based on the above, we want to implement a functionality based on the below selection, where in if we select week, then we should see the count of a metric only for the weeks which are passed by the above filters and similarly for months, days etc. For eg, if we select year, then we should get the count for the year 2022 only as this is the only year passed by the above filter.
Thanks for any help!
Technically possible? I think so. Feasible? No, not really.
While there is some playroom with bookmarks, custom graphics and clever use of a wide range of measures and calculation groups - it would be an enormous task to get everything running correctly and smoothly.
Perhaps one option is to introduce this filtering functionality via a custom visual that takes your date column as input?

How do I restrict a report to only show current data

I'm brand new to Power BI and I'm used to setting up most of my data in SQL Server (for SSRS). I have a data set and I was able to add in a Calendar table with my dates. My goal is to do a Year-over-year comparison. I got the year-over-year part working with the help of a couple of tutorials, but I want to restrict the report output to only data up to the last end of month (otherwise the YoY shows a case differential for dates out into 2021 - not helpful). I need a dynamic filter and all I seem to be able to set are static filters. This filter needs to be on the data itself - nothing a user can or should touch. Any help would be appreciated.

how to get all the records in between a Start Date and End date in Power BI?

am a newbie to PowerBi i need some help to filter all the values which come in between the start date and end date. when i tried only one of the filter is working and both the start date and end date are drop down filters i've taken just a dummy data set and practicing it. before implementing it in my project.
this is my dummy data set which i have created in excel. I created a Table based on Employee joining("start date") and Employee resignation date("end date"). The values are a bit unrealistic but i need the logic how we can implement it i need to have both start and end date as Drop Down filters for getting the records between that time frame .
Please use Advanced Filtering in visual filters.

Change column values based on slicer selection

Using PowerBI desktop, I have created a small table (called TimeSelector), with three elements: Day, Week and Month
The idea is to use the content of this table to create a slicer with three options
Thus, selecting one of those options should change the way dates are used in tables.
For instance, selecting Day would result in the following table:
While selecting Week would result in this:
Etc..
I have tried to write a new measure taking in account the selected slicer element, but it is not working:
DayWeekMonthSelection = IF(CONTAINS(TimeSelector;TimeSelector[DayWeekMonth];"Month");
MONTH(VALUES('uptime_downtime'[Uptime_date])))
This is only the first part of the formula, only testing the month option as a start.
Any idea on how to do this?
To offer another perspective:
The approach I take with this is to have a separate table in the database - containing meta data about the date, called date_lookup.
2 of the fields in this table are FirstDateOfMonth & FirstDateOfWeek.
Some of the other fields are lastDateOfMonth & LastDateOfWeek, also DayOfWeek.
By using these fields I can easily present visuals that are grouped by month or week.
Sure you can use functions to get this information, but functions can be platform dependant. If you're making a join to the date_lookup anyway - it's no more effort to get this info from there...
The main reason we need to store this meta data is our company Financial year is Jul - Jun. Therefore we need to have available the Correct FY - which is stored as a field in the date_lookup table. I also have fields in there identifying public holidays...
This is an interesting question, but I'm not sure how to do exactly what you are asking for, so I'll suggest an alternative. (Changing a measure based on a slicer selection isn't too difficult, but I'm not sure a good way to swap out a field/dimension.)
Instead of creating a separate table for your slicers, a different possible approach would be to create a date hierarchy. Often when you drag a date column into the rows or columns box it will automatically create a date hierarchy with Year/Quarter/Month/Date, but since you want week and not quarter, let's create one manually.
First, create a couple calculated columns for week and month. For example:
Month = FORMAT(uptime_downtime[Date], "mmm")
Week = WEEKNUM(uptime_downtime[Date])
Now right-click on the date on the fields, and choose New Hierarchy. It should look like this now:
Now drag the Month and Week columns onto Date Hierarchy and then rearrange them in the appropriate order:
Now you can use that hierarchy in a matrix and use the drill up and down buttons
to get the different groupings:

Including Re-occurring Time Saved in Date Slicer Output

I am looking into utilising PowerBI to identify time saved due to various Projects. People will add the projects to a Sharepoint List which then feeds into PowerBI.
PROJECTs Table:
Project Tite, Desc, Hours/Month Saved, StartDate, EndDate, Repeat? (T/F)
[Some Projects only save a fixed 10 or so hours, others save time per month (indicated by the Repeat Column)]
I've created two measures, RUNTIME determining how long the project has run in months ((TodayDate - StartDate)/30) as well as TIMESAVED which is the total hours saved from that specific project (RUNTIME*Hours/Month Saved).
Whilst this works, it has a pretty big limitation. When selecting a range, say 01/01/2017 - 01/01/2018, any projects with a start date before that range are excluded. However these maybe on-going, meaning the time saved by this project during the range needs to be added.
I've attempted to find a solution to this, however I keep getting stuck at requiring the the filter dates from the slicer, however I'm not certain this is possible. I need those projects with on-going savings to have the savings during the period given to be counted as well.
Possible alternative maybe to create a Month/Year column per Month/Year with a custom formula per column to determine that projects Hours saved for that Month/Year however this seems inefficient, at that point back to Excel might be better.
Any ideas / suggestions would be greatly appreciated, currently running through any ideas to solve but keeps coming back to needing that value specified by the filter. Cheers in advance for any advice tackling this :)
See also: https://community.powerbi.com/t5/Desktop/Re-occuring-Savings-over-Time-with-Time-Date-Slicer/m-p/346100
Unfortunately, there is no current simple solution to this problem out-of-the-box with Power Bi. All of the slicers seem to handle dates as a single point in time. They suffer in that if you are dealing with any items that span a Start and End date (like your projects, and most of my data examples) they only take one of the dates as the input. The slicers need to accept an optional end date in our case and then perform a simple date span overlap logic to determine the items that match.
I tried to solve your problem with out-of-the-box Power Bi Desktop slicers and a custom visual Timeline Slicer I found at the store with no luck earlier this month. Out of frustration, I posted a question in the Power Bi forums for suggestions.
The final suggestion from the forums I got was to "use two Filters at Filter pane". But I am not satisfied with this answer.
The Timeline Slicer code is open source and when I get more time (ha ha), I would like to make this change to the Timeline Slicer and publish it back to the repository for everyone to use.
I will monitor this question and the forum to see if a solution emerges in the future.
You can use Timeline Storyteller. you can create your time line and add a couple Slicers for Start and End. It will split by day the dates and you won't miss any data.