Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi everyone
I need to compare the numbers of samples arriving at a lab by day - and compare 2019 to 2020. But need the days of the week to line up -
DayNoOfYear =
DATEDIFF ( DATE ( YEAR ( 'Table'[Date] ), 1, 1 ), 'Table'[Date], DAY ) + 1
that formula is all good, but I need day 1 of 2020 (a wednesday) to have the number 2 against it so that it matches with the first day Wednesday in 2019, which is a 2 (day 1 of 2019 is a Tuesday).
Is it possible to modify that formula so that if year = 2020 I can make it be +2 at the end instead of +1 in my date table?
Hope all are well
Claire
Perhaps something like:
DATEDIFF ( DATE ( YEAR ( 'Table'[Date] ), 1, 1 ), 'Table'[Date], DAY ) + 1 + WEEKDAY('Table'[Date]) - WEEKDAY(DATE(YEAR('Table'[Date])-1,1,1))
Would likely need refinement.
Hi Greg, thanks for your reply! I added the formula (day num of year V2) and its done something very curious! am trying to pull it apart to understand why its doing what its doing, as feel like this could be a solution !
This is probably a pretty hack solution, but I just did this:
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
26 | |
21 | |
16 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |