cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Measure data filter on dates, but only shows equal date, instead of equal and lower dates

I have the following measure what should generate a whole number that counts the rows. I want to measure historical data on the following statements:

- The selected date should be higher or equal to the creation date (Date_entered)
- The selected date should be lower or equal to the close date (Date_Closed) OR Date_Closed is black (empty)

Therefore I use the following measure, but it only returns the data where the selected date is equal to the creation date. It doesn't count the earlier dates where the statements for are correct. 

Try1 = 
Var selectedDate = SELECTEDVALUE('Calendar'[DateAsInteger])
Var Calc = CALCULATE(COUNTA(SR_Service[countIfTicket]);
      FILTER(SR_Service;
          AND(selectedDate >= SR_Service[Date_Entered - Date];
          OR(SR_Service[Date_Closed - Date] = BLANK();
                selectedDate <= SR_Service[Date_Closed - Date])))
)
Return Calc

Al the dates have the Format "DD-MM-YYYY"
Also there is a realation to the Calendar table and SR_Service table (on Date and Date_Entered)

I hope somebody has idea where this goes wrong.

1 REPLY 1
Super User III
Super User III

Re: Measure data filter on dates, but only shows equal date, instead of equal and lower dates

Hi @Anonymous

Can you share the pbix? With dummy data if necessary, reproducing the issue

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Top Solution Authors
Top Kudoed Authors