cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Brianoreilly Regular Visitor
Regular Visitor

Dynamic Date Slicer: Date Table and Source Table with Two Date Columns

 

Hi Community, 

 

I have a problem.

 

I have a number of measures that I need to build via a method of using a date slicer to sum the value between two dates. 

(See Screenshot below). 

 

I need Dax to push the Min Slicer Value (Date Table) and Max Slicer Value (Date Table) into measures in the Timecard Table. 

 

The timecard table works on the premise of two date fields. Start Date and End Date.

 

I need to create a measure that sums the values in the Total hours columns, where the Start Date >= Min Date on the Slicer & the End Date <= Max Date on the Slicer. 

 

 

I need to build many measure via a similar method. 

 

I am hoping to avoid the relationship method and userrelationship method if possible. 

 

Any help would be appreciated. 

 

Slicer Question.JPG

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Dynamic Date Slicer: Date Table and Source Table with Two Date Columns

@Brianoreilly,

 

You may refer to the DAX below.

Measure =
SUMX (
    FILTER (
        Timecard,
        Timecard[Start Date] >= MIN ( 'Date'[Date] )
            && Timecard[End Date] <= MAX ( 'Date'[Date] )
    ),
    Timecard[Total Hours]
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 REPLY 1
Community Support Team
Community Support Team

Re: Dynamic Date Slicer: Date Table and Source Table with Two Date Columns

@Brianoreilly,

 

You may refer to the DAX below.

Measure =
SUMX (
    FILTER (
        Timecard,
        Timecard[Start Date] >= MIN ( 'Date'[Date] )
            && Timecard[End Date] <= MAX ( 'Date'[Date] )
    ),
    Timecard[Total Hours]
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 140 members 1,601 guests
Please welcome our newest community members: