Filter On Slicer Not Filtering Measures

I have a measure which now works very well and relationship well set up which should filter too but it’s not function. I have looked at the DAX code and the relationship all seem to be looking alright.

Split of Hours =

----- Calculation of Total Duration Hours -----

VAR _Total_Duration_Hours =
SUM( ‘Project Data’[Total Duration(Hours)] )

----- Calculation of Consolidated Total Hire Days -----

VAR _Total_Hire_Days =
CALCULATE(
VAR _Table_1 =
FILTER( DATES ,
DATES[Date] >= SELECTEDVALUE( ‘Project Data’[Project Start Date] ) &&
DATES[Date] <= SELECTEDVALUE( ‘Project Data’[Project End Date] ) )

VAR _Hire_Days = 
COUNTROWS( _Table_1 )

RETURN
_Hire_Days ,
    ALL( Dates ) )

----- Calculation of Individual Hire Days -----

VAR _Table_2 =
FILTER( DATES ,
DATES[Date] >= SELECTEDVALUE( ‘Project Data’[Project Start Date] ) &&
DATES[Date] <= SELECTEDVALUE( ‘Project Data’[Project End Date] ) )

VAR _Individual_Hire_Days =
COUNTROWS( _Table_2 )

RETURN
DIVIDE( _Total_Duration_Hours * _Individual_Hire_Days , _Total_Hire_Days , 0 )

From the first image without any selection, the report is displayed but when you select a value on the filter as seen in the second image, nothing is returned.
Wondering what the issue might be

Project Hours Split.pbix (768.7 KB)

Thank you

Hi there,

Don’t you to have a filter statement using your job id. I only see your filter on date.

don’t know how to correct it as i’m weak on dax.

thanks
Keith

It is why I am asking the question too.

hi there…it works.

as you can see.

I just checked your filter on a couple of job id …there is nothing in your data as i can see.

keith

You are right Keith. There where blanks coming from the filters

good to help :slight_smile: