Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello All, I have this calc column, but the start dates are not correct, because when the year is starting, the Week Text must says:
-for dec-27 to dec-31: "W #53 Dec-27 / Dec-31"
-for jan1 and jan2: "W #1 Jan-01 / Jan-02"
Same for next years... any ideas?
Solved! Go to Solution.
@eduardosilvin3
Create a calculated column as follows:
Week Text =
VAR __T = FILTER( 'Calendar' , Calendar[Week Year] = EARLIER( 'Calendar'[Week Year] ) )
VAR __MinDate = MINX(__T , Calendar[Date] )
VAR __MaxDate = MAXX(__T , Calendar[Date] )
RETURN
"W #" & Calendar[Week Num] & " " & FORMAT( __MinDate , "Mmm-yy" ) & "/ " & FORMAT( __MaxDate , "Mmm-yy" )
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
try this @eduardosilvin3
Week Text =
VAR CurrentWeekYear = Calendar[Week Year]
VAR WeekStart = CALCULATE(MIN(Calendar[Date]), ALLEXCEPT(Calendar, Calendar[Week Year], Calendar[Week Num]))
VAR WeekEnd = CALCULATE(MAX(Calendar[Date]), ALLEXCEPT(Calendar, Calendar[Week Year], Calendar[Week Num]))
RETURN
"W #" & Calendar[Week Num] & " " & FORMAT(WeekStart, "MMM-yy") & " / " & FORMAT(WeekEnd, "MMM-yy")
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
@eduardosilvin3
Create a calculated column as follows:
Week Text =
VAR __T = FILTER( 'Calendar' , Calendar[Week Year] = EARLIER( 'Calendar'[Week Year] ) )
VAR __MinDate = MINX(__T , Calendar[Date] )
VAR __MaxDate = MAXX(__T , Calendar[Date] )
RETURN
"W #" & Calendar[Week Num] & " " & FORMAT( __MinDate , "Mmm-yy" ) & "/ " & FORMAT( __MaxDate , "Mmm-yy" )
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Working great, thanks!
sure sorry:
try this @eduardosilvin3
Week Text =
VAR CurrentWeekYear = Calendar[Week Year]
VAR WeekStart = CALCULATE(MIN(Calendar[Date]), ALLEXCEPT(Calendar, Calendar[Week Year], Calendar[Week Num]))
VAR WeekEnd = CALCULATE(MAX(Calendar[Date]), ALLEXCEPT(Calendar, Calendar[Week Year], Calendar[Week Num]))
RETURN
"W #" & Calendar[Week Num] & " " & FORMAT(WeekStart, "MMM-yy") & " / " & FORMAT(WeekEnd, "MMM-yy")
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Working great, thanks!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
78 | |
76 | |
53 | |
37 | |
31 |
User | Count |
---|---|
101 | |
56 | |
51 | |
45 | |
40 |