date
176 TopicsHow to handle two date conditions on the same chart while keeping visual interaction in Pow
Hello, I have been trying for several days now to solve an issue in my Power BI report. Context: I am analyzing ticket creation, resolution date, and compliance for a client. How: I determine whether tickets fall within the scope of the analysis by applying several filters: ticket type resolution date a date range status Why: Once the tickets meet these criteria, my measure returns "OK" if they are compliant, or "KO" if they are not. Requirements: First, I need to check that tickets are in "Authorized" status and that their [duedate] is earlier than the date selected in the filter. Second, I need to check that tickets are in status ("Qualified" OR "Closed") and that [duedate] falls within a date range selected in the filter. Additional constraints: Both KO and OK tickets must be displayed on the same chart. There must be only one single [duedate] date filter on the report page. The chart must remain interactive with the table showing the ticket details within the analysis scope. In other words, when I click on the "KO" slice in the chart, only KO tickets should appear in the table. Same for OK tickets. Here is the formula with the date filters included, just to illustrate the logic: C1 = IF( AND( OR( NOT(AND( 'TABLE'[statusName] = "Authorized", 'TABLE'[duedate]<=DATE(2025,12,15) )), 'TABLE'[statusName] IN {"Technically qualified", "Operationally qualified", "Closed"} && NOT(ISBLANK('TABLE'[TQ_StatusDate])) && 'TABLE'[duedate] >= DATE(2025,09,01) && 'TABLE'[duedate] <= DATE(2025,12,15) ), 'TABLE'[TQ_StatusDate]<='TABLE'[duedate] ), "OK", "KO" ) Problem: If I filter on the interval from 2025-09-01 to 2025-12-15, the first part of my formula is no longer exhaustive, because for that part I need to include everything before 2025-12-15, not just what falls inside the selected interval. I managed to work around this by using the ALL() function (to remove the date constraint) in order to count tickets matching the criteria and display them in a single chart, but this only gives me aggregated counts and removes the interaction with the detail table. Thank you in advance for your help. CharlesSolved1.1KViews1like7CommentsRolling Date Identifiers
I support a team monitoring weekly captured data from a 5 week window. Each row of my set has a specific date - thousands of rows of data fitting into 5 weeks, and my report needs to dynamically compare each week's data with the others. I'm working to prep DAX to assign number 1-5 to each of the weeks as the project rolls on. So currently: Dec 22 = 1, Dec 29 = 2, Jan 5 =3, Jan 12 = 4, Jan 19 = 5. Next week: Dec 29 = 1, Jan 5 = 2, Jan 12 = 3, Jan 19 = 4, Jan 26 = 5 and so on.. First time in the forums so please let me know if I need to provide additional context.Solved1.2KViews2likes6CommentsPower BI Slicer - Between Dates don't get the latest date
Hello everybody!! I need some help with the date slicer on Power BI Desktop. When I create my Dashboard, I put an slicer between two dates, that are my first and last date based on my Calendar table (it's based on my first ticket creation date, on my tickets table, and "today" function). After, I publish it on my Report Server, set the schedule refresh, everything is okay. But on the next day, when I'll check the Dashboard, after the refresh, the last date wasn't the most recent date (or today, in that case), but the date when I published the Dashboard, so the viewer needs to slide the filter to the right to get the actual date, or click on the "clean filters" button. That's the example of date filter that I'm using. It was published on Jul,11 (it's on Brazilian format), and the second image, is the today refresh. Note that the first date changes too, because the Dashboard was published with data from Apr, 11 2019 to Jul, 11 2024, so at the refresh, my source data was only after Jan, 2 2023 There's some solution based on this? I've the latest release of Power BI Desktop and Report Server, but I didn't find any settings to do that. I've searched in a bunch of topics here, on Stack Overflow, Reddit, but didn't find anything specific for that.Solved3.7KViews0likes2CommentsToggle between columns used in a date slicer
Hello hopefully this is pretty straightforward. I am wondering if it is possible to have a date slicer on my page, but allow the user to toggle between two dates. For example, I have order date and due date. I want to have just one date slicer on the page, but allow the user to select "Order Date" or "Due Date" from another slicer. Based on their selection, I want the date slicer to use the appropriate date field. Is that possible? I have looked into a slicer table and then a measure, but in the measure I am not sure how to return the date values to use in a slicer, only to return calculated values such as counts and totals.Solved759Views0likes1CommentDynamic Holiday Calendar
Sharing this solution in case anyone else finds it useful. My company closes on US Federal Holidays and some additonal dates. The difficulty with identifying this data year after year is that some of these dates are dyanmic based on the week in a month or when they are observed if falling on a weekend. Obviously the static dates are easy year after year. After a lot of piecing together and trial/error, here's the measure I created w/notes on what the date represents: isholiday = SWITCH(([Date]), DATE(YEAR([Date]), 01, 01), "Y", // New Year's Day IF(WEEKDAY(DATE(YEAR([Date]), 01, 01), 2) = 7, DATE(YEAR([Date]), 01, 02),""), "Y", // New Year's Day on Sunday, observed 02Jan IF(MONTH([Date]) = 1, CEILING(EOMONTH([Date],-1)-1,7)+16, ""), "Y", //MLK Day (3rd Monday in Jan) IF(MONTH([Date]) = 2, CEILING(EOMONTH([Date],-1)-1,7)+16, ""), "Y", //President's Day (3rd Monday in Feb) IF(MONTH([Date]) = 5, CEILING(EOMONTH([Date], 0)-1,7)-5, ""), "Y",//Memorial Day DATE(YEAR([Date]), 06, 19), "Y", //Juneteenth IF(WEEKDAY(DATE(YEAR([Date]), 06, 19), 2) = 6, DATE(YEAR([Date]), 06, 18),""), "Y", // Juneteenth on Saturday, observed 18Jun IF(WEEKDAY(DATE(YEAR([Date]), 06, 19), 2) = 7, DATE(YEAR([Date]), 06, 20),""), "Y", // Juneteenth on Sunday, observed 20Jun DATE(YEAR([Date]), 07, 04), "Y", // July 4th IF(WEEKDAY(DATE(YEAR([Date]), 07, 04), 2) = 6, DATE(YEAR([Date]), 07, 03),""), "Y", // July 4th on Saturday, observed 03Jul IF(WEEKDAY(DATE(YEAR([Date]), 07, 04), 2) = 7, DATE(YEAR([Date]), 07, 05),""), "Y", // July 4th on Sunday, observed 05Jul IF(MONTH([Date]) = 9, CEILING(EOMONTH([Date],-1)-1,7)+2, ""), "Y", //Labor Day (1st Monday in Sep) IF(MONTH([Date]) = 11, CEILING(EOMONTH([Date],-1)-4,7)+26, ""), "Y", //Thanksgiving (4th Thursday in Nov) IF(MONTH([Date]) = 11, CEILING(EOMONTH(DATETABLE[Date],-1)-4,7)+27, ""), "Y", //Day after Thanksgiving (4th Friday in Nov) DATE(YEAR([Date]), 12, 24), "Y", //Chrismas Eve DATE(YEAR([Date]), 12, 25), "Y", //Christmas Day DATE(YEAR([Date]), 12, 26), "Y", //Closed DATE(YEAR([Date]), 12, 27), "Y", //Closed DATE(YEAR([Date]), 12, 28), "Y", //Closed DATE(YEAR([Date]), 12, 29), "Y", //Closed DATE(YEAR([Date]), 12, 30), "Y", //Closed DATE(YEAR([Date]), 12, 31), "Y", //New Year's Eve "") Pre-requiste: Date table with a Date field. To assess if your date in another table is a holiday in your Date table (1:M or 1:1 relationship with additional tables), you can use this formula in a measure: IF( CALCULATE( MIN('DATETABLE'[isholiday]), FILTER('DATETABLE', [Date] = MIN([yourdatetocompare]) && [isholiday] = "Y")) = "Y", dothisiftrue, dothisiffalse) Hope someone else finds this useful and if you do - cheers!Solved1.3KViews0likes1CommentCalculate Days in Two Months Based on Start and End Date
EVALUATE VAR StartDate = DATE(2024, 9, 17) VAR EndDate = DATE(2024, 10, 5) -- Find the last day of the start month (September) VAR EndOfStartMonth = EOMONTH(StartDate, 0) -- Calculate the number of days in the start month (September) VAR DaysInStartMonth = DATEDIFF(StartDate, EndOfStartMonth, DAY) + 1 -- Calculate the number of days in the end month (October) VAR StartOfEndMonth = DATE(YEAR(EndDate), MONTH(EndDate), 1) VAR DaysInEndMonth = DATEDIFF(StartOfEndMonth, EndDate, DAY) + 1 -- Return the result RETURN UNION ( ROW ( "Month", FORMAT(MONTH(StartDate), "mmmm", "en-US"), "Days", DaysInStartMonth ), ROW ( "Month", FORMAT(MONTH(EndDate), "mmmm", "en-US"), "Days", DaysInEndMonth ) ) without using format function i get correct month like 09,10 as month. but when i pass month(startDate) to format function returns only January as month. Any why it does that? Month Days January 14 January 5 I want to get Month Days September 14 October 5Solved906Views0likes3CommentsFilter Date Column by multiple criteria
I have a Date Column in Power BI that displays dates in the typical dd/mm/yyyy format. I would like to display, on a bar chart, the following: One bar that sums the # of people that have a date between 03/25/2024-10/24/2024 and another bar that sums the # of people who have a date on or after 10/24/2024 Thanks so much.712Views0likes1CommentIssue with Multiple date keys and displaying dates on report.
Hello, i am working on a SSAS Tabular model to support Power BI report development. Our main fact table has multiple dates (Order Date, Paid Date, Shipped Date) with the Order Date being the active relationship to the date dimension. One of our reports requires a table that has the following columns (amoung others) Date and Amount by Paid Date. I understand how to build the measure "Amount by Paid Date" using USERELATIONSHIP to active the relationship between my fact.paid_date_key and the dim.date_key. Other than fully duplicating my date dimension to have a "Paid Date Dimension" and use that inactive relationship. how can i include "Paid Date" in my report table?1.3KViews0likes7CommentsDate Issue on chart
Hi. I have a chart with a date which looks fine in Powerbi but as soon as I publish a report, the dates all splay out into random months which aren't even in the date field. The actual month_year column is a string field which is formatted from a date column and ranked by a separate YYMM column. Can't figure out why I'm getting this display issue - is it a powerbi bug? Any help would be greatly appreciated. Thanks, In BI desktop: In Bi when published: Data:Solved788Views0likes2Comments