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 a column in my data called 'week of' and it displays the date for the Monday of that week. For example, this week the date listed is November 7, 2022.
I want to create a new column that provides a true or false value, based on whether the date showing in the week of column is the current week and year.
For example: It would show true for the line item with November 7, 2022, in the week of column, but false for November 14, 2022.
Solved! Go to Solution.
Hi @Anonymous , try this calculate column:
Result =
var _year= YEAR(Table_example[Date])
var _week=WEEKNUM(Table_example[Date])
var actual_week=WEEKNUM(TODAY())
var actual_year= YEAR(today())
return
IF(_year=actual_year && _week=actual_week,"True","False")
- The result:
Best regards
Hi @Anonymous , try this calculate column:
Result =
var _year= YEAR(Table_example[Date])
var _week=WEEKNUM(Table_example[Date])
var actual_week=WEEKNUM(TODAY())
var actual_year= YEAR(today())
return
IF(_year=actual_year && _week=actual_week,"True","False")
- The result:
Best regards
User | Count |
---|---|
84 | |
78 | |
70 | |
46 | |
42 |
User | Count |
---|---|
106 | |
50 | |
49 | |
40 | |
40 |