weeknum
12 TopicsWeeknum - weeks covering 9 days
Hi, I have been putting together a custom financial year callendar, i have realised that the Weeknum dax is returning the same week number for the range of 9 days, is there a way to fix it? Example below Thank you in advance for any adviceSolved900Views0likes5CommentsWeek per month that starts over every 4 weeks
I want to count each sales week of the month from 1 to 4, so that I can apply a color to the week ( 1 = red, 2 = blue, etc.). Here's what I tried so far, which works up until the end of February. I want to restartt the count from 1 to 4 for the week numbers as shown in the table below. Thanks for your time. "Week Ending", [Date] - WEEKDAY( [Date], 1) + 7, // Use the last week number of month to reset the counting, min week number = 1, max week number = 4 "Week in Month", IF( WEEKNUM( [Date]) > 4, WEEKNUM( [Date] ) - 4, WEEKNUM( [Date])) Date Week in Month Desired Week in Month 2/18/2024 4 4 2/19/2024 4 4 2/20/2024 4 4 2/21/2024 4 4 2/22/2024 4 4 2/23/2024 4 4 2/24/2024 4 4 2/25/2024 5 1 2/26/2024 5 1 2/27/2024 5 1 2/28/2024 5 1 2/29/2024 5 1 3/1/2024 5 1 3/2/2024 5 1 3/3/2024 6 2 3/4/2024 6 2 3/5/2024 6 2 3/6/2024 6 2 3/7/2024 6 2 3/8/2024 6 2 3/9/2024 6 2Solved1.2KViews0likes3CommentsPlease Help. WeekNum to Pay Period column/Formula
l'm creating a workbook for tracking meetings. I've just generated a pivot table calendar from a sheet with the following columns: "Date, WeekNum, WeekDay, Day, Month." It's great! However, I desperately need either the week number to align with the pay period calendar (starting on XX/XX/YR instead of 01/01/YR), or I need a column that is going to show the pay period week formulated off of the week number- but starting over at the end of the pay period year (So it can't just be a basic cell/value+#). Also, I'm COMPLETELY new to this, so I'm way in over my head with the formulas- but work is work. So, basically explain step by step what to do, or else I'll be lost. Thanks!729Views0likes1CommentWeek start day monday
Hello guys, I need to check if the day is a weekend or not, knowing that the week should starting with Monday. And to do it, i used weekday function. But the result is not correct. I have tried all the options and these are the diffrent results i have: weekday([date], 1) ===> Friday 1, saturday 2 , sunday 3 weekday([date], 2) ===> saturday 1, sunday 2, monday 3 weekday([date], 3) ===> saturday 0, sunday 1, monday 2 and what i need is that the number of monday should be 1 , saturday 6 and suday 7 as described in the documentation here : https://learn.microsoft.com/fr-fr/dax/weekday-function-daxSolved10KViews0likes6CommentsWeek over Week sales calculation
I am trying to figure out week over week calculation. I searched online and found DAX measure. I created columns for Year, WeekDay, and WeekNum. what I am using is like below: WoW Rev OTB = SUM ( 'Table'[sales on the book] ) - CALCULATE ( SUM ( 'Table'[sales on the book] ), FILTER ( ALL ( 'table' ), 'table'[Year] = MAX ( 'table'[Year] ) && 'table'[WeekNumber] = MAX ('table'[WeekNumber]) - 1 && 'table'[WeekDay] = MAX ( 'table'[WeekDay] ) ) ) The result turned very well, I got the total number for week over week sales. However, when I tried to apply on different region or destinations or choose other status, the week over week sales numbers showed all negative numbers which doesn't seem correct. (This is the screenshot for WoW sales without any filters) (After I selected "Established" in status slicer, all the numbers turn into negative. Same thing would happen if I selected product market slicer.) Can anyone help me how to apply week over week sales on categories? Thank you in advance!1.9KViews0likes4CommentsM code for a DAX expression
Hi everyone, I need to transform this DAX expression in M: Week= YEAR(Calendar[Date]+26-WEEKNUM(Calendar[Date],21)) & "-" & IF(WEEKNUM(Calendar[Date],21)>=10, WEEKNUM(Calendar[Date],21), "0" & WEEKNUM(Calendar[Date],21)) which calculates the week of the year followed by the year for each date of my calendar, according to the European system: Can you help me? Many thanks!566Views0likes1CommentFunction Calendar Wrong WeekNum
Hi there, I have a date table with the following DAX-Code: Dates = CALENDAR(DATE(2018,01,01),DATE(2030,12,31)) According to the documentation, the WeekNum function works like this: "By default, the WEEKNUM function uses a calendar convention in which the week containing January 1 is considered to be the first week of the year. However, the ISO 8601 calendar standard, widely used in Europe, defines the first week as the one with the majority of days (four or more) falling in the new year. This means that for years in which there are three days or less in the first week of January, the WEEKNUM function returns week numbers that are different from the ISO 8601 definition." For the year 2021 happens exactly this case. There are 1.1. - 3.1. in the week 53 of the year 2020. But the the WEEKNUM-Functions shows this three days as the week no. 1 of the year 2021. The result, the WeekNum numbers don't match with the no. in europe. How can I fix mismatch? Thanks for help Cheers Mike_CHSolved33KViews0likes10CommentsHow to get an aggregated value for each week
Hi Guys I have a problem I am unable to solve. I am trying to get an aggregated value for the week that is monday - sunday. How am I able to aggregate it so it shows just for the last day of the week. sample table: Assuming by week is Monday - Sunday. Please I want to aggregate all quantities for each week and show it on the weekend date (Sunday of each week which is the max date) Category Date Qty Expected result a 1/3/2022 100 - a 1/4/2022 150 - a 1/5/2022 50 - a 1/6/2022 300 - a 1/7/2022 100 - a 1/8/2022 25 - a 1/9/2022 0 725Solved2.4KViews0likes4CommentsFISCAL QUARTER WEEK CALCULATIONS - CONFUSED
Hi guys, I developed a calculated column to group dates within a Fiscal Quarter into their respective Week Groupings within the fiscal quarter. The measure works perfectly for FQ1,FQ2,FQ3 but not for FQ4 which I believe is because the calculation is confused by my fiscal periods ( Fiscal Year Begins in Feb) Here is my measure : VAR Q = 'DATE'[FiscalQuarter] VAR Y = 'DATE'[FiscalYear] VAR FYMONTH = 'DATE'[FiscalMonthNum] VAR MONTH1 = FORMAT('DATE'[Date],"MMM") VAR WEEKNUM1 = RANKX(FILTER('DATE','DATE'[FiscalQuarter] = Q && 'DATE'[FiscalYear] = Y ), WEEKNUM('DATE'[Date],2),,ASC,Dense) VAR WEEKNUMBERS = IF('DATE'[QUARTER START DAY] <> "Mon" && WEEKNUM1 = 1,1,IF('DATE'[QUARTER START DAY] <> "Mon",WEEKNUM1-1,WEEKNUM1)) RETURN WEEKNUM1 Here are my skewed reuslts for Q4 : As you can see FQ4 should begin in November but the weeks start ascending in January, then November and finally December but the tru order should be November, December and then January. Any idea how to fix my formula to take into account my fiscal period?Solved590Views0likes1Commentcalculate value for previous week of the month
hi everyone im trying to find week over week change for weeks of the month ex. if we are now in the month of FEB2022, weeks would be: W1: 1-2 till 5-2 W2: 6-2 till 12-2 W3:13-2 till 19-2 W4: 20-2 till 26-2 W5: 27-2 till 28-2 i want to calculate the week over week change and for that i need to find the value for previous week example with data: W1: 2478 W2: 3457 W3:3359 W4:3456 W5:574 week over week change for W2 would be (3457-2478)/2478=39.5Solved2KViews0likes3Comments