Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All,
I need to count the number of closed tickets in a table between 2 dates.
I have a date table connected to my data table
To get a closed date I had to use an if statement:
Solved! Go to Solution.
Hi @Anonymous ,
To create a measure as below.
Measure =
CALCULATE (
COUNTROWS ( Query1 ),
FILTER (
Query1,
Query1[Closed Date] >= DATE ( 2018, 08, 01 )
&& Query1[Closed Date] <= DATE ( 2019, 07, 31 )
)
)
If it doesn't meet your requirement, kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
Hi @Anonymous ,
To create a measure as below.
Measure =
CALCULATE (
COUNTROWS ( Query1 ),
FILTER (
Query1,
Query1[Closed Date] >= DATE ( 2018, 08, 01 )
&& Query1[Closed Date] <= DATE ( 2019, 07, 31 )
)
)
If it doesn't meet your requirement, kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
Worked perfectly, thanks
Hi @Anonymous
Try this as a measure:
Closed Tickets =
CALCULATE (
COUNTROWS ( Query1 ),
DATESBETWEEN (
Calendar,
DATE ( 2018, 08, 01 ),
DATE ( 2019, 07, 31 )
)
)
You can, of course, make this a dynamic measure by replacing the hardcoded dates in the DATESBETWEEN function.
Hope it helps.
Best regards,
Martyn
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
65 | |
63 | |
53 | |
39 | |
26 |
User | Count |
---|---|
85 | |
57 | |
45 | |
44 | |
36 |