Forum Discussion
suchy1981
4 years agoNew Member
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
- amitchandakSuper User
suchy1981 , You can not create a column using measure or using slicer value.
You can create a line level measure using SUMX/COUNTX, MIX etc
MINX(Table, <Code>)
In visual display, it is at the desired level.
If you need filters use bucketing
Dynamic segmentation -Measure to Dimension conversion: https://youtu.be/gzY40NWJpWQ
Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1387187#M626
Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k