The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 |
---|---|
80 | |
73 | |
40 | |
30 | |
28 |
User | Count |
---|---|
107 | |
97 | |
55 | |
47 | |
46 |