@datetime functions
10 TopicsNeed to getting only rows who have last day of month according to multiple slicer selection
Hi Team, I need your help to achieve some results in the form of a table chart in Power BI. We have the dataset as shown in the picture below. Project Name ResultCount DateTime Pipeline Name ReleaseName Spark 1273 08/22/2024 scm - IM 4.7.0 Spark 5092 08/27/2024 scm - IM 4.7.0 Spark 1339 08/28/2024 scm - IM 4.7.0 Spark 1340 09/02/2024 scm - IM 4.7.0 Spark 5360 09/23/2024 scm - IM 4.7.0 Spark 1341 09/24/2024 scm - IM 4.7.0 Spark 1341 09/26/2024 scm - IM 4.7.0 Spark 4023 09/30/2024 scm - IM 4.7.0 Spark 1341 10/01/2024 scm - IM 4.7.0 Spark 4023 10/03/2024 scm - IM 4.7.0 Spark 2779 10/14/2024 scm - IM 4.7.0 Spark 1341 10/29/2024 scm - IM 4.8.0 Spark 1341 10/30/2024 scm - IM 4.8.0 Spark 4025 11/06/2024 scm - IM 4.8.0 Spark 1342 11/07/2024 scm - IM 4.8.0 Spark 2684 11/21/2024 scm - IM 4.8.0 Spark 2684 11/28/2024 scm - IM 4.8.0 Spark 2500 11/29/2024 scm - IM 4.8.0 Spark 2684 11/29/2024 scm - IM 4.8.0 Spark 2684 12/04/2024 scm - IM 4.8.0 Spark 5368 12/05/2024 scm - IM 4.8.0 Spark 2684 12/23/2024 scm - IM 4.8.0 Spark 1342 12/24/2024 scm - IM 4.8.0 Spark 4023 12/30/2024 scm - IM 4.8.0 Spark 4052 12/31/2024 scm - IM 4.8.0 Spark 2740 01/02/2025 scm - IM 4.8.0 Spark 2746 01/08/2025 scm - IM 4.8.0 Spark 1373 01/28/2025 scm - IM 4.8.0 Spark 1373 01/29/2025 scm - IM 4.8.0 Spark 77 09/30/2024 scm-IA 4.7.0 Spark 154 12/05/2024 scm-IA 4.8.0 Spark 80 12/10/2024 scm-IA 4.8.0 Spark 78 12/10/2024 scm-IA 4.8.0 Spark 78 01/02/2025 scm-IA 4.8.0 Spark 84 01/03/2025 scm-IA 4.8.0 Spark 84 01/08/2025 scm-IA 4.8.0 Based on the above dataset, we have three slicers on our page: Project Name, Pipeline Name, and Release Name. So based on the slicer selection we need to show only those rows who have last day of month only. For example, if I select Pipeline Name - scm - IM, we need to show only the records for the last day of every month:- same like below result Project Name ResultCount DateTime Pipeline Name ReleaseName Spark 1339 08/28/2024 scm - IM 4.7.0 Spark 4023 09/30/2024 scm - IM 4.7.0 Spark 1341 10/30/2024 scm - IM 4.8.0 Spark 2500 11/29/2024 scm - IM 4.8.0 Spark 2684 11/29/2024 scm - IM 4.8.0 Spark 4052 12/31/2024 scm - IM 4.8.0 Spark 1373 01/29/2025 scm - IM 4.8.0 same if I am select Pipeline Name - scm-IA then need to show only below result [all records for last day of every month]:- Project Name ResultCount DateTime Pipeline Name ReleaseName Spark 77 09/30/2024 scm-IA 4.7.0 Spark 80 12/10/2024 scm-IA 4.8.0 Spark 78 12/10/2024 scm-IA 4.8.0 Spark 84 01/08/2025 scm-IA 4.8.0 Additionally, we can also filter the data based on Release Name. For example, if I select Pipeline Name - scm - IM and Release Name - 4.7.0, we need to show only the records for the last day of every month. Need output like below pic. Project Name ResultCount DateTime Pipeline Name ReleaseName Spark 1339 08/28/2024 scm - IM 4.7.0 Spark 4023 09/30/2024 scm - IM 4.7.0 Spark 2779 10/14/2024 scm - IM 4.7.0 and if I am selecting Pipeline Name - scm - IM and Release Name - 4.8.0 then need to get result like below Project Name ResultCount DateTime Pipeline Name ReleaseName Spark 1341 10/30/2024 scm - IM 4.8.0 Spark 2500 11/29/2024 scm - IM 4.8.0 Spark 2684 11/29/2024 scm - IM 4.8.0 Spark 4052 12/31/2024 scm - IM 4.8.0 Spark 1373 01/29/2025 scm - IM 4.8.0 and for Pipeline Name - scm-IA and Release Name - 4.7.0 then need to get result like below Project Name ResultCount DateTime Pipeline Name ReleaseName Spark 77 09/30/2024 scm-IA 4.7.0 and for Pipeline Name - scm-IA and Release Name - 4.8.0 then need to get result like below Project Name ResultCount DateTime Pipeline Name ReleaseName Spark 80 12/10/2024 scm-IA 4.8.0 Spark 78 12/10/2024 scm-IA 4.8.0 Spark 84 01/08/2025 scm-IA 4.8.0Solved1.4KViews0likes7CommentsRolling sales from the last 24 months
Hi, management wants to see the accumulated sales until now vs the accumulated sales from the last two years in a graphic displaying the last 24 months. I have written this measure for the rolling numbers, thinking that MAX Date was related to our current time (today). Instead, Max date looks at row level and so it computes rolling numbers backwards, which is not what we want. Sales cumulated rolling = CALCULATE ( [Total Sales], DATESINPERIOD ( 'Datetable'[Date], MAX ( 'Datetable'[Date] ), -24, MONTH )) With this, I will see the accumulated sales with May 2022 as a label but including numbers from 2020. What I need is basically the raw numbers since January 2022, accumulated. I have looked around, but I am lost. Can someone help here? Thanks! Pauline.1.6KViews0likes4CommentsFind duration spent between 2 dates in multiple rows
Have a data like below Ticket num Created Ticket_1 11/3/2022 0:06 Ticket_1 11/3/2022 0:18 Ticket_1 11/3/2022 0:21 Ticket_1 11/3/2022 0:22 Ticket_1 11/3/2022 0:23 Ticket_1 11/3/2022 0:24 Ticket_1 11/3/2022 0:26 Ticket_2 12/12/2022 13:40 Ticket_2 12/12/2022 13:41 Ticket_2 12/12/2022 13:43 Ticket_2 12/12/2022 13:45 Ticket_2 12/12/2022 13:45 Ticket_2 12/12/2022 13:46 Would like to calculate Time Taken in each ticket by subtracting the created column data for each row for all ticket num. Here Time taken for 1st row calculated as ( 11/3/2022 0:18 - 11/3/2022 0:06) *24 = 0.1919444 ....until another ticket starts, to have 0 before a new ticket starts Results to look something like below table Ticket num Created Time Taken Ticket_1 11/3/2022 0:06 0.1919444 Ticket_1 11/3/2022 0:18 0.0547222 Ticket_1 11/3/2022 0:21 0.0175 Ticket_1 11/3/2022 0:22 0.0108333 Ticket_1 11/3/2022 0:23 0.0166667 Ticket_1 11/3/2022 0:24 0.0369444 Ticket_1 11/3/2022 0:26 0 Ticket_2 12/12/2022 13:40 0.0158333 Ticket_2 12/12/2022 13:41 0.0205556 Ticket_2 12/12/2022 13:43 0.0419444 Ticket_2 12/12/2022 13:45 0.0041667 Ticket_2 12/12/2022 13:45 0.0061111 Ticket_2 12/12/2022 13:46 0Solved544Views0likes1CommentDAX with Today (text data type), Last 7 dates(with text data type) and future dates(date data type)?
Hi Team, I am new to power bi. Kindly please help me below dax issue with date dropdown filter. Like, Today date with Text Data Type Last 7 days with Text Data Type and Future dates with Date Data Type. Kindly please he me on this case. I need to go all above cases in one dropdown filter. please help me best approch?Solved806Views0likes3CommentsHow to find inside a string to do time calculation
Hi everyone! I'm working with sports data, calculating the time on court for players and would like to calculate time when a specific string (player name) is inside a column. Due to the data structure, I have the info for the full FiveOnCourt and based on positions but not for a player alone. Here is the example: As you can see, I have "Player7" who played in different positions so I would like to have one only table with the following values for each player (not needed the order because it's only an example with players with more than one position): PLAYER7 - 1 - 00:17:39 (0:05:26 + 0:12:13) - 41 PLAYER13 - 1 - 0:28:40 (0:21:02 + 0:07:38) - 84 PLAYER... PLAYER... So, I guess I have to create a measure to find every string inside the FiveOnCourt but I don't know how I could do it. Could you help me, please? I add the link to the raw data and the pbix file: https://drive.google.com/drive/folders/1BxVWCtoHkcQYnDfOpqmYFpFgXpoEIPOt?usp=drive_link Thank you for your time!646Views1like2CommentsAverage answer time for chat messages
Hi, i want to find average answer time for a spesific group. Receivers may be change, i should examine all conversations seperately. Table is like that: sender_id receiver_id date-hour spesific_group 2 1 01.01.2022 09:00 No 1 2 01.01.2022 09.10 Yes 1 3 02.01.2022 10:00 Yes 3 1 02.01.2022 13.00 No 1 3 02.01.2022 13.30 Yes 5 6 02.02.2022 15.00 Yes 6 5 02.02.2022 15.30 No 5 6 02.02.2022 15.40 Yes for ex, sender 1's average answer time is 10 minutes from the conversation with 2 and 30 minutes from the conversation with 3. It means that average answer time for 1 is 20 minutes. And for number 5, average time is 10 minutes. I hope I have been able to explain, thank you If it's too complicated I'm open for another approximate solutionsSolved837Views0likes1CommentLast 3 months date column using DAX in pbi, Kindly please help?
Hi Team, I am new to power bi. I have date column as like below snapshot. based on this column I need to filter last 3 months data only. By using relative date in slicer settings it will not working and not changing anything in visual level. Kindly please help me with DAX Query for last 3 months? Thanks in advance!393Views0likes1CommentDateDiff until end of month
Hi guys, I'm working on a table with several columns: date, product and status. Each product can have several statuses (working, not working). I'm looking to calculate how long each product stayed in a certain status. For this I have a measure that calculates for each product How long has it been until the next time it changes status and so on. BUT I have a problem the result obtained does not reflect reality. if for example a product A was "working" from 01/01/2021 until 01/05/2021 (4 days difference) in this date it will "Not working". but the 02/05/2021 it will be "working" so my measure says me that passed from here 30 days. But actually that is not true. Because if I want to display for the January month how many days was the product "not working" so I'll get the result 30 ! But the reality is that in January the product was 25 days in this status and not 30, the five days have to be in the next month ! Actually dax have to understand that he have to stop the sum of days at the end of month if not I'lol get fake data with slicers. do you have a solution ?3.2KViews0likes12CommentsRestrict YTD with Max order date and keeps filter of Calender table
Hi All, how can I bring previous row value to the next row. Like in below table, i do not have value in 13th Jan, so it should show 12th Jan Value. I have using the below dax because I have to restric ytd upto the max order date. Total YTD (current) = TOTALYTD([Total sales], 'Calender Table'[Date], 'Calender Table'[Date] <= MAX(Data[Order Date]) ) Thanks.1.4KViews0likes7CommentsShowing logged in user Date time with Type of timezone it belongs to
Hi, In the Report, i need to show the logged in users current Datetime and type of timezone it is showing. Using DAX Now() i will get the current date and time however i am not getting whether it is EST,PST or CET timezone. I need to add timezone also to the timestamp. Please suggest if anything related to Power Query or DAX function this can be achieved. Thanks in Advance.1.9KViews0likes4Comments