Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
83 | |
78 | |
54 | |
39 | |
35 |
User | Count |
---|---|
98 | |
80 | |
50 | |
48 | |
48 |