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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Display elements from a selected date (between start and end date)

Hi PowerBI Community,

 

I don't find a way to display information according to a selected date. Here is my problem:

 

I have a set of data that looks like this:

clemman_5-1679738529870.png

 

I would like to sum up the estimated volumes for a specific year. Let's say that I select multiple years using a dropdown list:

clemman_4-1679738371360.png

 

I selected 2025 and 2026, so I would like to display the result of the following calculation: 2*411,613 (because both 2025 and 2026 are both between 2021 and 2026) + 1*63,442 (because only 2025 is between 2020 and 2025) + ...

 

I hope that my issue is not too complex to understand, I tried to explain the simplest way.

I am really looking forward to reading your solutions!

 

Thank you very much!

Clemman

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

You can try the following methods.

Measure =
VAR _table =
    ADDCOLUMNS (
        'Year',
        "Value",
            SUMX (FILTER ('Table',
                    [Start date] <= EARLIER ( 'Year'[Year] )
                        && [End date] >= EARLIER ( 'Year'[Year] ) ),
                [Estimated volume] ) )
RETURN
    SUMX ( _table, [Value] )

vzhangti_0-1679898125323.pngvzhangti_1-1679898134042.pngvzhangti_2-1679898144005.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

2 REPLIES 2
Anonymous
Not applicable

Hi,

 

This is exactly what I wanted to do!

 

Thank you very much @v-zhangti !

v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

You can try the following methods.

Measure =
VAR _table =
    ADDCOLUMNS (
        'Year',
        "Value",
            SUMX (FILTER ('Table',
                    [Start date] <= EARLIER ( 'Year'[Year] )
                        && [End date] >= EARLIER ( 'Year'[Year] ) ),
                [Estimated volume] ) )
RETURN
    SUMX ( _table, [Value] )

vzhangti_0-1679898125323.pngvzhangti_1-1679898134042.pngvzhangti_2-1679898144005.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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