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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Measure Showing Blank When Paired With Date

Hi All,

 

I have the following measure:

 

Annual Total Working Days Lost Count =
VAR DayOfWeek = ADDCOLUMNS('Date', "Weekday", WEEKDAY([Date],2))
VAR _FILTER = FILTER(DayOfWeek, [Date] >= MAX('Prototype Annual Data'[Start Date of Absence]) && [Date]<= IF( MAX('Prototype Annual Data'[End Date of Absence])=BLANK(),TODAY(), MAX('Prototype Annual Data'[End Date of Absence])))
RETURN
CALCULATE(COUNTX(FILTER(_FILTER, NOT([Weekday] IN {6,7})),[Date]), USERELATIONSHIP('Date'[Date], 'Prototype Annual Data'[Start Date of Absence]))
 
which counts the total working days lost for absences regardless of whether they are ongoing or closed. The measure works correctly when paired with the Start and End Date of Absences from the 'Prototype Annual Data' table. However, appears blank when paired with the likes of Month and Year from my Date:
 
JK_PowerBINew_0-1658909377547.png

 

My Date table is connected to the Prototype Annual Data Table via two inactive relationships:

JK_PowerBINew_1-1658909443963.png
I thought that this may be the result of the problem and introduced a USERELATIONSHIP filter but this does not seem to change the outcome.

 

I do not actually need the measure to work in this may but rather to validate that another measure (the sum of this count) is working properly and the correct absence days are being assigned to the correct months.

Many thanks!

1 REPLY 1
lbendlin
Super User
Super User

when designing measures use variables and CONCATENATEX to validate the results of each intermediate step. That will help you figure out where your context transition is messing up the result.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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