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.
Hi,
I have a table with column Date (dd/mm/yyyy), Week Start Date , Week End date.
How do I count number of rows between Week Start Date & Week End Date just for year 2020.
Exp:-
Week Range Total Rows
______________ _______________
6/1/2020 - 12/1/2020 128
13/1/2020 - 19/1/2020 122
Any ideas on how I could write a formula to achieve this?
Solved! Go to Solution.
Hi @Adam_Harris ,
You can try to use the DAX below to create a calculated column:
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Week Range
Week Start Date = Date[Date] - WEEKDAY(Date[Date],2) + 1
Week End Date = Date[Date] - WEEKDAY(Date[Date],2) + 7
in a dynamic
Hi,
Perhaps you could try something like
Measure =
CALCULATE(
COUNTROWS('Table'),
FILTER(
'Table',
'Table'[Date]>= MIN('Table'[Week Start Date])
&& 'Table'[Date] <= MAX ('Table'[Week End Date])
))
Its give me result :
Week Start Date Week End Date Total Rows
17/2/2020 23/2/2020 1
17/2/2020 23/2/2020 1
17/2/2020 23/2/2020 1
17/2/2020 23/2/2020 1
17/2/2020 23/2/2020 1
17/2/2020 23/2/2020 1
17/2/2020 23/2/2020 1
17/2/2020 23/2/2020 1
17/2/2020 23/2/2020 1
10/2/2020 16/2/2020 1
10/2/2020 16/2/2020 1
10/2/2020 16/2/2020 1
But i'm expecting like this:
Week Start Date Week End Date Total Rows
17/2/2020 23/2/2020 18
10/2/2020 16/2/2020 21
Hi @Adam_Harris ,
You can try to use the DAX below to create a calculated column:
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |