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.
I have column year-week ,i need to create date form year week(Thursday of week)
in Qlikview i used function "makedate" but i don't know in PBI used any function?
Solved! Go to Solution.
Hi @Fonlovedog207 ,
Try this code to create a calculated table.
Calendar Only Thursday =
VAR _Calendar_Only_Thursday =
FILTER (
ADDCOLUMNS (
CALENDAR ( DATE ( 2023, 01, 01 ), DATE ( 2023, 12, 31 ) ),
"Year", YEAR ( [Date] )
),
WEEKDAY ( [Date], 2 ) = 4
)
VAR _AddRank =
ADDCOLUMNS (
_Calendar_Only_Thursday,
"Rank",
RANKX (
FILTER ( _Calendar_Only_Thursday, [Year] = EARLIER ( [Year] ) ),
[Date],
,
ASC,
DENSE
)
)
RETURN
SELECTCOLUMNS (
_AddRank,
"Year Week",
[Year] * 100 + [Rank],
"Date Need", [Date]
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Fonlovedog207 ,
Try this code to create a calculated table.
Calendar Only Thursday =
VAR _Calendar_Only_Thursday =
FILTER (
ADDCOLUMNS (
CALENDAR ( DATE ( 2023, 01, 01 ), DATE ( 2023, 12, 31 ) ),
"Year", YEAR ( [Date] )
),
WEEKDAY ( [Date], 2 ) = 4
)
VAR _AddRank =
ADDCOLUMNS (
_Calendar_Only_Thursday,
"Rank",
RANKX (
FILTER ( _Calendar_Only_Thursday, [Year] = EARLIER ( [Year] ) ),
[Date],
,
ASC,
DENSE
)
)
RETURN
SELECTCOLUMNS (
_AddRank,
"Year Week",
[Year] * 100 + [Rank],
"Date Need", [Date]
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This code would do the job for you.
YEARWEEK = YEAR('Date'[Date])& WEEKNUM('Date'[Date],1)
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 |
---|---|
81 | |
75 | |
60 | |
37 | |
33 |
User | Count |
---|---|
102 | |
56 | |
52 | |
46 | |
40 |