Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi, I need an very urgent request to show the units for only completed weeks; below is the week structure
Below is the link for my previous question still no answer;
https://community.powerbi.com/t5/Desktop/DAX-to-show-all-N-completed-weeks-data/m-p/745014#M359143
i tried Weekoffset & it works for last 2 weeks and not for all completed weeks (maybe 13 or 15 weeks)
Used another DAX measure
Flag_Test = If(format([Last Refreshed], "mm dd yyyy") = format(Calendar_time[Date], "mm dd yyyy"),"Current",
Solved! Go to Solution.
Create new tables
calendar = ADDCOLUMNS ( CALENDARAUTO (), "year", YEAR ( [date] ), "month", MONTH ( [date] ), "weeknum", WEEKNUM ( [date], 2 ), "year-weeknum", YEAR ( [Date] ) & WEEKNUM ( [Date], 2 ) )
weekset = VALUES('calendar'[weeknum])
Don't create any relationship for "weekset" table
Create measures in Sheet3
selected_weeknumber = SELECTEDVALUE(weekset[weeknum]) current_week = WEEKNUM(TODAY(),2) last week = [current_week]-[selected_weeknumber] flag = IF(MAX('calendar'[weeknum])<[current_week]&&MAX('calendar'[weeknum])>=[last week],1,0)
Create new tables
calendar = ADDCOLUMNS ( CALENDARAUTO (), "year", YEAR ( [date] ), "month", MONTH ( [date] ), "weeknum", WEEKNUM ( [date], 2 ), "year-weeknum", YEAR ( [Date] ) & WEEKNUM ( [Date], 2 ) )
weekset = VALUES('calendar'[weeknum])
Don't create any relationship for "weekset" table
Create measures in Sheet3
selected_weeknumber = SELECTEDVALUE(weekset[weeknum]) current_week = WEEKNUM(TODAY(),2) last week = [current_week]-[selected_weeknumber] flag = IF(MAX('calendar'[weeknum])<[current_week]&&MAX('calendar'[weeknum])>=[last week],1,0)
User | Count |
---|---|
141 | |
113 | |
104 | |
78 | |
64 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |