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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
v-tianyich-msft
Community Support
Community Support

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
v-tianyich-msft
Community Support
Community Support

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
Resident Rockstar
Resident Rockstar

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.