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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
suchy1981
New 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 1
amitchandak
Super User
Super 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/1...


Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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