User Profile
JPScotland
Helper I
Joined 6 years ago
User Widgets
Contributions
Re: Difference between datetime column and end of the same day
so I got there in the end. Not ideal but works. So in my date table i created a column that gives you the end time of each day End of Working Day = 'Date'[Date] + TIME (23,59,59) So now I can do a quick lookup to find the end if the day in questions and them work out the difference between the 2. NOTE: you will need a column in your table that shows just the date without the time. This is what you use to search the date table. DATEDIFF( Repairs[Main_Date/Time], LOOKUPVALUE('Date'[End of Working Day], 'Date'[Date], Repairs[Main_Date (Date Only)]), MINUTE) Cheers.980Views0likes0CommentsRe: Filter OR across different tables
Yep I see your issue now. Possibly you could create a custom table (using CALCULATETABLE) and bring in all the elements you need from the 3 tables, then use the formula from above based on the new custom table. I think you would need relationships between the tables for this to work: - _calcTable = VAR _altTable = CALCULATETABLE ( SUMMARIZE ( TABLE1, TABLE1[sales1[id]] TABLE2[sales2[id]] TABLE3[sales3[id]] ) ) RETURN _altTable887Views0likes0CommentsDifference between datetime column and end of the same day
I have a datetime column but what I want to do is something like this DATEDIFF ( datetime, SAMEDAY@ 23:59:59), MINUTE I cant seem to find a way of working out the end of day using the date from the datetime column. Cheers, JPSolved1KViews0likes3CommentsCalculate time duration between 2 dates and times including partial days
Hi, I am looking to do exactly what is in this post below except instead out outputting the number of complete days, I need partial days also. https://community.powerbi.com/t5/Desktop/DATEDIFF-Working-Days/td-p/130662 i.e. Start Date/Time = 14/04/2022 07:45 End Date = 14/04/2022 13:45 RESULT = 0.25 Start Date/Time = 14/04/2022 08:33 End Date = 20/04/2022 14:07 RESULT = 6.23 You can get this by a simple subtraction calc but I need to filter out working days which wont work with the suctraction. The only way I can really think of working it out is to possibly caculate it all in minutes and filter out days by subtracting 1440 minutes for each day that is not a workday. Cheers, JPSolved3.5KViews0likes2Comments- 603Views0likes0Comments
Filter not picking up values
I have 3 tables [jobbing_Data_General], [Completed_Jobs], and [Date]. [jobbing_Data_General] is 1:1 with [Completed_Jobs] on attribute [Job Number as integer]. [jobbing_Data_General] is 1:many with [Date] on attrinute [Date Job Raised (Date only)] [Completed_Jobs] is 1:many (inactive) on attribute [Date Job Completed (Date Only)] So If I want to count the number of jobs completed and use the Date as a slicer, I need to use the USERELATIONSHIP function to go direct to [Date]. [jobbing_Data_General] has a relationship with [Date] on Jobs Raised, not Complete so I need to avoid going thorugh this table as it messes up the results. Count Completed Jobs = CALCULATE ( COUNTX ( Completed_Jobs, Completed_Jobs[Job Number as integer]), USERELATIONSHIP ( Completed_Jobs[Date Job Completed (Date Only)], 'Date'[Date] ) ) This works fine, but now I need to add a filter that comes from the [jobbing_Data_General] table called [Job Priority Code]. So I add this into the formula from above: - Count of Emergency Jobs Complete = CALCULATE ( COUNTX ( Completed_Jobs, Completed_Jobs[Job Number as integer]), USERELATIONSHIP ( Completed_Jobs[Date Job Completed (Date Only)], 'Date'[Date] ), FILTER ( Jobbing_Data_General, Jobbing_Data_General[Job Priority Code] = "3" ) ) The strange this is is will produce only results for one [Job Priority Code] but not any others. I just get BLANK. I thought it was the data so I started a fresh report and it does the same but on a different [Job Priority Code]. Its like its only able to use it if it appears at the top of the table or something? I basically need to pull off how many jobs are completed by different priority codes. Any help would be appreciated. Cheers, JPSolved666Views0likes2Comments
Data Privacy
Microsoft Fabric Community and Privacy
To learn more about how we manage your data, please review the Microsoft Fabric Community Data Privacy guide.