Forum Discussion

suchy1981's avatar
suchy1981
New Member
4 years ago

Using value from filter in DAX formula

Dear,

 

In my power BI report I have filter build from data. Than I create the measure like

 

Min Date Range ALLSELECTED col =
DATEVALUE(CALCULATE (
MIN ( allObjectsBatBuild2[date] ),
ALLSELECTED ( 'allObjectsBatBuild2')
))
 
and I got right value. But if I want to create column in which I want to use this measure:
 
iii = if(allObjectsBatBuild2[date] < allObjectsBatBuild2[Min Date Range ALLSELECTED],1,0)
 
it doesn't work. It means there is no error but formula if doesn't work properly. IF I will put the date like this
 
iii = if(allObjectsBatBuild2[date] < DATE(2021,3,16), 1,0)
 
all is fine. Why can't I use in IF formula allObjectsBatBuild2[Min Date Range ALLSELECTED]
 
Thanks for any help
 

1 Reply