Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
elinevans
Helper I
Helper I

Record being filtered out incorrectly

Hello, 

 

I have an issue where I am trying to find the amount on professional referrals in a time frame for our service. I use a date slicer using a calendar table to select the date. I have used the following measure to get my values: 

ReferralsCountAll = CALCULATE(COUNTROWS(Activity), filter(Activity, Activity[Start] <= max(DateTable[Date]) && Activity[Start] >= min(DateTable[Date])))
And filter the activity to 'Referral In ~ Professional referral' using the filter tab. 
 
It seems to work fine, other than a few values that lie at the end of my date slicer. e.g if I was looking at April 2021, a few activities thathappened on the 30th of April aren't appearing in my count but are in my data. 
For example, here's a list of clients referred in the time period:
elinevans_0-1634565383145.png

 

And here is the result I get using the measure:

elinevans_1-1634565405016.png

 

Client 3766 is missing, eventhough it falls into the date slicer dates. 

 
 
Does thedate slicer not include the end dates in the filtering?
 
Thanks
Elin
1 ACCEPTED SOLUTION
tex628
Community Champion
Community Champion

Hi @elinevans

Is your Activity[Start] column a datetime column? 

If it is check what the time value is of the records, if it's above 00:00:00 it will not be considered less or equal and therefore excluded!

Br,
J


Connect on LinkedIn

View solution in original post

3 REPLIES 3
AlexisOlson
Super User
Super User

If your calendar table has a relationship with the Activity table on the Start column, then I'd think you'd just need ReferralsCountAll = COUNTROWS ( Activity ). What happens if you try that?

tex628
Community Champion
Community Champion

Hi @elinevans

Is your Activity[Start] column a datetime column? 

If it is check what the time value is of the records, if it's above 00:00:00 it will not be considered less or equal and therefore excluded!

Br,
J


Connect on LinkedIn

Hi @tex628

 

Thank you so much!! Been staring at it for hours, originally changed on the data preview but not on power query 😬 thanks again! 

 

E

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.