cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Get the cumulatieve value before the selected month WIP

Hi all,

 

I am trying to create a Work in Proces overview which shows the total amount to be invoiced. This overview has a from till slicer on month level. The first column always needs to show the cumulative values of all months before the first month selected in the slicer.

See a simpel model for example from month 2 til month 4:

  Selected months 
 Start WipWorked hours Written offInvoicedEnd Wip
Project A100500200200200
Project B-501000050
Project C20001001000

 

If I would change the Slicer to from month 5 til month x The value of the [Start WIP] would be the [end Wip] in the table above. 

 

The end Wip = (begin WIP+worked hours) - (written off + Invoiced)
I am struggeling to get the formula for the [Start Wip], This is essentially the cumulative [end Wip] of the month before the selected month. 

However I think I am getting into a Loop and I cannot figure out how to het the total from the selected month -1. 

 

Hope you can help me

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Helper II
Helper II

Re: Get the cumulatieve value before the selected month WIP

Hi stachu,

 

Thankx for you reply. It took a while for anybody to respond so i have figured it out myself. I used this formula 

OHW Begin periode =
var mindate = CALCULATE(FIRSTDATE('Calendar'[Date]);ALL('Calendar'[Date]))

return
CALCULATE( [OHW eind -1];
FILTER(ALL('Calendar');'Calendar'[Date] < mindate))


this always gets me the cumulative totals of the months before the selected months. Regardles if I select multiple months. 

View solution in original post

3 REPLIES 3
Highlighted
Super User II
Super User II

Re: Get the cumulatieve value before the selected month WIP

Can you add sample tables (in format that can be copied to PowerBI) from your model with anonymised data? Like this (just copy and paste into the post window).

Column1 Column2
A 1
B 2.5

I mean the input tables, as I assume the one you posted is your expected output, correct?



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Proud to be a Super User!

Highlighted
Helper II
Helper II

Re: Get the cumulatieve value before the selected month WIP

Hi stachu,

 

Thankx for you reply. It took a while for anybody to respond so i have figured it out myself. I used this formula 

OHW Begin periode =
var mindate = CALCULATE(FIRSTDATE('Calendar'[Date]);ALL('Calendar'[Date]))

return
CALCULATE( [OHW eind -1];
FILTER(ALL('Calendar');'Calendar'[Date] < mindate))


this always gets me the cumulative totals of the months before the selected months. Regardles if I select multiple months. 

View solution in original post

Highlighted
Super User II
Super User II

Re: Get the cumulatieve value before the selected month WIP

glad to hear you solved it yourself 🙂
can you mark your post as solved, so it can help others in the future?



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Proud to be a Super User!

Helpful resources

Announcements
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Don't miss the Power BI Dev Camp this week!

August Community Highlights

Check out a full recap of the month!

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors