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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Netope
Helper I
Helper I

Inject date selection from a dropdown slicer into a dax formula

Hi I am trying to create a measure that sums Totals for all contracts with EndDate >= the Year/month selected in a slicer dropdown.

 

See PBI File with additonal explanations.

 

https://drive.google.com/file/d/1Mb4s79kyTZAUg5WK7EmrK6W7MpGwA4uX/view?usp=sharing 

 

Thanks!

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @Netope ,

 

You need to create an unrelated dimension table, for which you can view the following results:

vtianyichmsft_0-1731288474740.png

Table = SUMMARIZE('Selected Value',[EndDate])

Total = var _s = SELECTEDVALUE('Table'[EndDate])
RETURN CALCULATE(SUM('Selected Value'[Act]),FILTER('Selected Value',[EndDate]>=_s))

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thanks! it worked just fine

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Netope ,

 

You need to create an unrelated dimension table, for which you can view the following results:

vtianyichmsft_0-1731288474740.png

Table = SUMMARIZE('Selected Value',[EndDate])

Total = var _s = SELECTEDVALUE('Table'[EndDate])
RETURN CALCULATE(SUM('Selected Value'[Act]),FILTER('Selected Value',[EndDate]>=_s))

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

Thanks! it worked just fine

shafiz_p
Super User
Super User

Hi @Netope  Try the below code:

Total = 
VAR _selectedDate = SELECTEDVALUE('Selected Value'[EndDate])
RETURN
    CALCULATE(
        SUM('Selected Value'[Act]),
        FILTER(
            ALLEXCEPT('Selected Value', 'Selected Value'[Contract]),
            'Selected Value'[EndDate] >= _selectedDate
        )
    )

 

Hope this helps!!
If this solved your problem, please accept it as a solution and a kudos!!

 

Best Regards,
Shahariar Hafiz

Hi,

 

Thanks for your reply, I added the formular you suggested but the ourtcome reamins the same, the table only shown contract with end deate in the seclected month.

Any addiotnal ideas?

Thanks!Try1.JPG

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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