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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Measure using date range skips over dates

I have a measure that was created to count the number of bugs in a range of dates on another table based on when the bug was opened and closed. The measure is:

Sev3 = SUMX( 'Combined', COUNTX( FILTERS( 'DatesLink'[Date] ), IF( ( [Date] >= Combined[CreatedDate] && [Date] <= TODAY() ) && ( Combined[CompletedDate]=BLANK() || [Date] < Combined[ClosedDate] ) && Combined[Severity] = "3 - Medium", 1, BLANK() ) ) )

 

When I put the dates from DatesLink[Date] in a table, it is sequential (left picture), however, when I attempt to apply that measure to the same data, it skips dates (right picture). Can anyone point me to why this might be happening?

 

dates_correct.PNGdates_incorrect.PNG

 

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@Anonymous it means your measure is returning blank value. You can drop down date column and click show items with no data and it will show all the dates even if measure is returning blank value.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

2 REPLIES 2
TomMartens
Super User
Super User

Hey @Anonymous ,

 

I'm wondering if the tables 'Combined' and 'DatesLink' are related, and if this is the case what is this relationship? My assumption: the relationship is between the columns 'DatesLink'[Date] (on the one side) and 'Combined'[CreatedDate].

 

Maybe you might consider to check the option "Show items with no data" for the column 'DatesLink'[Date] that you are using in the table visual, the next screenshot shows how to check/uncheck this option:
image.png
I'm also wondering, why you are using the function FILTERS, from my understanding of the formula you provided I would use VALUES instead, even if both would return the same "table", as 'DatesLink'[Date] is used on the rows.
I would rewrite the measure like so (no idea if this solves the issue with skipped dates), but at least it chaches TODAY into a variable.

 

Sev3 =
	var _today = [today]
	return
	SUMX(
	'Combined'  
	, COUNTX( 
		VALUES( 'DatesLink'[Date] )
		, IF(
			AND(
				AND(
					AND( [Date] >= Combined[CreatedDate] ,  [Date] <= _today ) 
					, OR ( Combined[CompletedDate]=BLANK() ,  [Date] < Combined[ClosedDate] )
				)
				, Combined[Severity] = "3 - Medium"
			)
			, 1, BLANK() 
			) 
		) 
	)

 


Maybe the reason why dates are "skipped" if the measure is applied is simply this: it returns BLANK() for the dates from 2016 and 2017, as the bugs created in 2016 are no longer open (hopefully) 🙂

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
parry2k
Super User
Super User

@Anonymous it means your measure is returning blank value. You can drop down date column and click show items with no data and it will show all the dates even if measure is returning blank value.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.