Forum Discussion
Counting Rows By Date Column Where The Date Is Between A Specific Period
- 6 years ago
Hi FlyKick ,
If your X axis uses Tickets table's Date, you can create a measure and put it in Filter on this visual. Configure it as 1.
Measure = IF( MAX(Tickets[ClosedOnDateOnly])>=MIN('Date'[Date]) && MAX(Tickets[ClosedOnDateOnly])<=MAX('Date'[Date]),1,0)If your X axis uses Date table's Date, please try to delete the relationship between the date table and Tickets table.
If it doesn’t meet your requirement, could you please provide a mockup sample based on fake data?
It can help us reproduce your issue.
Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
FlyKick
I am halfway reading the question, the First point, the date table has to have a continuous date range with complete years. You can start building the dates using MIN and MAX of your data table and make them into full year.
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon on the right if you like this reply 🙂
- FlyKick6 years agoHelper II
Hey Fowmy,
Whilst I haven't checked the entire date table I have checked the time period I'm testing the slicer with and the date table has every day of the month. It's July 2020 and contains everyday from 1st through to 31st.
Just to clarify I haven't set the Date table as the date table for Power BI to use. I am just referring to it as my date table because it has a unique set of dates that I need in order to filter on both date columns on the tickets table.
Do you know for certain if the date table not being continuous would cause this issue even when the time period being filtered by includes all the dates for that month?
If so can you explain the logic to me as I can't for the life of me work out why that would cause any issues?
Surely it gets the min date from the date table 1st-Jul-2020 and the max date 31-Jul-2020 and passes that to the dates between function to count the rows?
If both dates exist in the date table and they are continuous (at least for that month) why would it cause incorrect count?