calendar
22 TopicsShowing working day no instead of calendar
Hello, i am facing a challenge where i want to have a bar chart showing daily invoiced sales, but instead of showing calendat day no number on x-axis i want to replace it with working day no. Data model setup: Base model: Tabular (storage mode: mixed) tables and dimensions used: 'Calendar'[ID] - linked to transaction table through a many to one relationship 'Calendar'[day no] - this is what i currently use on my x-axis. This is simply showing day number 1-30 depending on the selected fiscal year and fiscal month 'Calendar'[Fiscal Year] - used in dropdown to filter on fiscal year. runs from 1 july - 30 june 'Calendar'[Fiscal Month] - used in dropdown to filter on fiscal month. runs from 1 july - 30 june 'Global Measures'[Invoiced Amount] Requirements: Create a field to the calendar table return Working day no depending on the selected fiscal year and month. Working day counts as monday-friday, weekends is NOT a working day. Also public holidays should also not be taken into account. Working day should start counting from the first weekday of the filtered month and start over when a new month begins. Ideally, when using the field on the visual, weekends should be blank. I have tried to illustrate my idea through the snapshot below. The grey bars represent saturday and sunday to clearly distinct weekdays and weekends. So far i havent been able to find a working solution, so i am trying my luck making a post here. If there is any information needed regarding the data model or relationships etc. i will try to elaborate, just let me know.13Views0likes0CommentsPrevious Year Measure for Line Chart
Hello. I am trying to create a YOY cumulative active customer by month line chart. The line should show the number of customers who made at least one purchase. One for Selected Year and another for Selected Year - 1. And, the total is rolling, so the line should be going up over time. Because there is a year filter in play, I am having difficulties writing a measure that provides a PY Active Customer line for the line chart. If I have 2026 selected, previous years' active customers is reduced. So, I have to removefilter the Calendar. However, this causes the PY active customer line ignore the month on the X axis resulting in a flat total line. Please help me write a measure that accurately calculates PY active customers and still works in a line chart. Should look something like this: Sample file here. Thanks.Solved3.4KViews0likes10CommentsIssue with accounting for holidays in my workday count for 3 separate locations
I am having issues accounting for holidays in my workday count for each location. I currently have 2 fact tables that are joined to a calendar table and the calendar table connected to my holiday table. In my Holiday table i have a list of dates, holiday name and a location code. I have 3 location codes that are tied to 3 different locations. 1 code per location. Each location has a different set of holidays that they are closed. For example location code A has 10 different holidays tied to it. location code N has 11 holidays tied to it and code C has 9 holidays tied to it. I am trying to create a measure in a matrix that will basically show the count of working days for the week for each location including if there is a holiday. For Locaiton N and C they work Mon-FRI(5 days) and M works 7 days a week. If there is holiday i would like to drop my workday number down by 1. Currently my measure for workdays looks like this WorkingDaysPerWeek = VAR SelectedLocation = SELECTEDVALUE(LocationSlicer[Location]) RETURN CALCULATE( COUNTROWS('Calendar'), FILTER( 'Calendar', ( (SelectedLocation IN {"N", "C"} && 'Calendar'[Day Of Week] > 0 && 'Calendar'[Day Of Week] <= 5) || (SelectedLocation = "M") ) ) ) The code above is working perfect to show the workdays for each location. My 2 fact tables have the location code in them. I am having issues tying in the holidays. I have another table called LocationSlicer that is joined to my fact tables that basically acts as a slicer so i can pick my location.(there are multiple codes that tie into a location) Any help is appreicated!Solved717Views0likes3CommentsCalendar Table returning error: The expression specified in the query is not a valid expression
I am racking my brain. I am building a PBi dash from a SharePoint list. Before, the list had only a few lines of test data, so I had no problem creating the calendar table. However, I have a second data source, and I needed to build a calendar based on both sources' tables to make a splicer to filter visuals by date. At first, I thought the issue was that I had 2 data sources, so I combined them into 1 data source and simplified my DAX Date = CALENDAR( MIN('Deskside QA'[DateofQA]), MAX('Deskside QA'[DateofQA]) ) But after that, I get the error "The start date in Calendar function can not be later than the end date." So I added variables to lock down the functions Date = VAR MinDate = CALCULATE(MIN('Deskside QA'[DateofQA])) VAR MaxDate = CALCULATE(MAX('Deskside QA'[DateofQA])) RETURN IF( ISBLANK(MinDate) || ISBLANK(MaxDate) || MinDate > MaxDate, CALENDAR(TODAY(), TODAY()), // Fallback to a single day calendar if dates are invalid CALENDAR(MinDate, MaxDate) ) But then I get the error "The expression specified in the query is not a valid expression" I have been running in circles and throwing in curly brackets but nothing seems to give me a solution.Solved3.5KViews1like10CommentsNo scrollbar at the x-axis
Hi Community, I've got the following X-axis (no scrollbar), but when I choose EOMONTH, the datapoints don't represent the actual graph. Is it possible to create a line-chart visual without a scrollbar, but with actual weeks, like 2020-18 - 2020-19 etc. etc. The format of the week is text and 2020-18 / 2020-19. When I try to make this number/date, for example 202018; between 202052 and 202101 there is a lot "white"space; In excel you can take the labels and there it is. Here, in PBI I find this very hard. Can someone help me? Thanks!1.5KViews0likes6CommentsHelp with calendar
Hi, I have a baffling issue creating column Month (see the screenshot) where the date column will change to the next month. Without adding column Month - table values are correct Add Month column - the date column is wrong Any hints are appreciated. Thanks.Solved885Views0likes4CommentsSum if date is within last 7 calendar days of month
Hi, I need to calculate the sum of the # of invoices, but only if the Date is in the last 7 calendar days of each month. I will have YTD data, updated daily. # invoices Date 7 6/27/2023 4 6/28/2023 2 6/29/2023 1 7/21/2023 2 7/22/2023 4 7/27/2023 5 7/28/2023 2 7/29/2023 3 7/31/2023 I thought about trying to create a column with "true" if it is in the last 7 days, and "false" if not. But I don't know how to write that. Anyone have ideas?Solved1.1KViews0likes4CommentsTime Intelligence Function - Do I need a calendar?
Hi, I am a bit confused if I would require a calendar for my data analysis. I viewed a post similar to my question but it did not give the answer I needed. My data is extracted from SAP to MS Excel as the example shown below. I am trying to perform an analysis of my current year actuals vs current year budget vs previous year actuals for each product group in respective to their country. This should be done as per the year to date figures. As you can see, my data does not have a calendar (day month/year) for each sales. Is this necessary? If so, what are my options? Posting Period Current Year Actual Current Year Budget Previous Year Actual 1 10,000 9,000 8,000 2 7,000 8,000 8,000 3 6,000 5,000 7,000 4 6,000 6,000 5,000 5 4,000 7,000 5,000 6 12,000 10,000 11,000 7 13,000 12,000 10,000 8 9,000 6,000 7,000 9 7,000 5,000 8,000 10 5,000 6,000 5,000 11 8,000 7,000 5,000 12 10,000 7,000 5,000 I'm currently trying to figure out how I can calculate the year to date values for each criteria (CY actuals vs CY budget vs PY actuals). With this, I want to summarise the data for each country/product group. I would really appreciate if you could help. Many thanks.1.2KViews0likes5CommentsCannot understand this measure I inherited
Hi, I inherited this measure from someone who was building reports for our company before I started. When used as a filter it seems to limit the data returned to revenue items for the current month or the previous month. Would anyone be kind enough to try to interpret it for me? MonthOnlyLedger = VAR monthNum = IF(MONTH(TODAY()) = 1, 12, MONTH(TODAY())-1) VAR yearNum = YEAR(TODAY()-31) VAR zeroNum = INT(CONCATENATE(0, monthNum)) Return OR(CONTAINSSTRING(SPSRevenue[DisbursedToLedger], IF(monthNum > 9, CONCATENATE(RIGHT(yearNum,2), monthNum), CONCATENATE(RIGHT(yearNum,2), CONCATENATE("0", monthNum)))), CONTAINSSTRING(SPSRevenue[DisbursedToLedger], FORMAT(TODAY(), "yymm")))Solved686Views0likes2CommentsCalculating Total Employees each Month
Hi All, Looking to create a measure which tells me which employees are present at a certain month and year. I have a "Persons" Table with the following fields: Full Name, First Name, Last Name, Start Date, End Date. I have a "Calendar" table with the following fields: Date, Month, Year, YearMonth. Calendar is linked to Persons via an Active One to Many Relationship to Start Date. And a non-active relationship between date and End Date. How I can calculate how many staff at present at each month and year using this information. As the result I'm getting at the moment are only returning data for the month where people have a start date. For Example Aiden Sally's Count should appear from Jun 2018 - March 2023. For Example Yuliia Susan's Count should appear from Jun 2022 - March 2023.2.1KViews0likes8Comments