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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Distribute a specific value over a period of time

Hi there,

 

I have a table in Power BI Desktop with a start date and an end date. I have already calculated a value which should be distributed over this period of time.

 

So, for instance, if a project starts at 03/01/15 and ends at 05/01/15, the value should be displayed from March to May. 

 

In Excel, I have used the following formula so far:

 

= IF (AND([datevalue] >= [beginvalue];[datevalue]<=[endvalue)];[calculatedvalue];0)

 

However, I am not able to do the same thing in Power BI Desktop. Any ideas how I can accomplish that? Thank you in advance 🙂

 

 

 

Edit:

 

IDstartdateenddatevalue
103/01/201505/01/20155
202/01/201510/01/201510

 

Some further information about what I want to accomplish: I want to display the values 5 or 10 in the period between February and October 2015 (10 in February, 15 in March, 15 in April, etc.).

 

Thank you for your help guys!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

Refer to my blog to check how to deal with two dates and get in between range

: https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin

View solution in original post

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

Create a date table

then create a measure

Measure =
CALCULATE (
    SUM ( 'Table'[value] ),
    FILTER (
        'Table',
        'Table'[startdate]
            <= MAX ( 'date table'[Date] )
            && 'Table'[enddate]
                >= MAX ( 'date table'[Date] )
    )
)

Capture1.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-juanli-msft I am doing something similar and I used your method and it worked. Now, what if I need to get cumulative values as well?

amitchandak
Super User
Super User

Refer to my blog to check how to deal with two dates and get in between range

: https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.