Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello!
I am having trouble figuring out how to sort my data by week. I have the received date and the project ID, but I am unsure how to calculate the week number. My data consists of individual activities for the projects so I need to use a count of distinct project IDs.
I am trying to do 2 things:
My data looks like this
Activity ID | Project ID | Project Received Date |
a | 1 | 2/1/2020 |
b | 1 | 2/1/2020 |
c | 1 | 2/1/2020 |
a | 2 | 3/5/2021 |
a | 3 | 4/1/2021 |
b | 3 | 4/1/2021 |
Thank you in advance!!
Solved! Go to Solution.
The distinct count of projects is pretty straight forward:
Projects =DISTINCTCOUNTT ( ProjectsTable[Project ID] )
The AVG per week will require a calendar table with the year-week in it then you can use a measure like this.
Avg Weekly Projects = AVERAGEX(
VALUES(Dates[Year Week]),
[Projects]
)
I have attached my sample file for you to look at. It also contains theDAXX code to make the calendar table.
Hi,
You should create a Calendar Table and in that write a calculated column formula using the WEEKNUM feature to extract the week number from the Date.
The distinct count of projects is pretty straight forward:
Projects =DISTINCTCOUNTT ( ProjectsTable[Project ID] )
The AVG per week will require a calendar table with the year-week in it then you can use a measure like this.
Avg Weekly Projects = AVERAGEX(
VALUES(Dates[Year Week]),
[Projects]
)
I have attached my sample file for you to look at. It also contains theDAXX code to make the calendar table.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
95 | |
77 | |
68 | |
54 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |