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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
jakemorris606
Frequent Visitor

Filtering Visual with DAX

Hello,

 

i have create a dashboard to show which contractors are on site daily - the table at the bottom is a filtered by a DAX function which returns the value 1 if the contractos fall within with the range today (TODAY()) so which morning when its refreshed the table is updated the contractors in today! - this works perfectly . 

 

however i want to use the same prinipcals for visuals  (PieCharts / Synopic Panels etc) but when use this same DAX in the filter it returns all the values as '0' - and no data is vailable unless i set the filter to is = 0 then it show all data in the entire data set.

 

my  DAX ;

 

Is displayed =
var _date = TODAY()
var _startdate = SELECTEDVALUE('Contractor Jobs'[Arrival Date])
var _enddate = SELECTEDVALUE('Contractor Jobs'[Last Day Of Attendance])
return
IF(_date>=_startdate&&_date<=_enddate,
1, 0
)
 
 
 
jakemorris606_1-1658396896870.png

 

if anyone could offer any support i would be very greatful ,

 

 
kind regards,
jake 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@jakemorris606 , Try a measure like

 

countrows(filter('Contractor Jobs', 'Contractor Jobs'[Arrival Date] <= Today() && 'Contractor Jobs'[Last Day Of Attendance] >= Today()))

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

View solution in original post

2 REPLIES 2
jakemorris606
Frequent Visitor

Thank you Amitchandak!.

amitchandak
Super User
Super User

@jakemorris606 , Try a measure like

 

countrows(filter('Contractor Jobs', 'Contractor Jobs'[Arrival Date] <= Today() && 'Contractor Jobs'[Last Day Of Attendance] >= Today()))

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.