Forum Discussion
Distributing multiple values over different time periods
Would each day not have the same amount? I think I'm missing something in what you're asking.
From what I understand, you have $X as the contract amount. I calculate Y working days between now and the contract end date. I divide $X by Y days to find the amount per day. If you want to figure out the total revenue for a month (let's say September), just multiply by Z working days in September. So $X/Y days * Z days would get you your total expected dollar amount for September.
Otherwise, I may need you to explain the whole distribution of funds thing, since it seems like a very abstract concept right now.
Maybe I am thinking too complicated - I was planning to realise the distribution in a calculated column.
Your suggestion seems to be a measure. I agree that $X/Y days * Z days gives me the right amount, if X is valid for all days of Z.
At this point I am struggling. How to tell Power BI to take only those daily values and multiply them by future working days, where the contract is still valid?
- Cmcmahan6 years agoResident Rockstar
It seems super strange to me to set this up as a calculated column. Would you have the same contract number in multiple rows, along with every working date between start and end of contract, and the expected amount? That seems like a stupidly large amount of data replication.
When you say "if X is valid for all days of Z", how can you tell whether this is true for a given day and contract?
Would it make more sense with your data to take the contract start date instead of TODAY() as the first date, and then do the same math with that as a starting point?
- kathod6 years agoRegular Visitor
If the solution is a measure or a calculated column does not matter to me.
Does it help to take the contract start date? At the end I will filter on future days anyway.
Do you see the point where I am struggling? I need to make sure that the daily values are considered only for those days, where the date of the day is before (or on) the contract expiry date.
e.g. having a contract with total value 12k and expiry date 13.09.2019 -> daily value (future working days only) = 1k and now I want Power BI to consider this 1k for every day until expiry date; at the end I want to see, that the distributed contract value for August is 2k and for September it is 10k
- Cmcmahan6 years agoResident Rockstar
Most of what you're saying makes complete sense to me.
Just to recap what we can currently do and your goals:
- Currently, you can calculate the per day value of a contract
- This is done by taking the total value of a contract and dividing it by the number of working days between TODAY() and the contract end date
- ^ this is the part that doesn't make total sense to me. Is the total value of a contract updated daily? See my example below that explains my confusion.
- You can also count the working days in a given timeframe with your time dimension
- You have the option take the per day value of a contract and multiply it by the number of working days in a given timeframe
- This could be a single month, a week, now until the end of the contract, etc
I guess what I'm not understanding is why you're using TODAY() to calculate the remaining value of a contract. Please correct me, but I would assume the value of Contract LMNO is constant. If contract LMNO is a week long with a worth of $10,000, there would be 5 working days between contract start and end dates to split the $10,000.
However, if you use the number of working days between TODAY() and the contract end date, on the first day of the project, each day would show $2000, but the 2nd day there would only be 4 working days between the new TODAY() and the end date, meaning each day has a value of $2500, even though the contract value hasn't changed.
If the remaining value of a contract is updated daily, please let me know and ignore this whole section, as your setup makes much more sense if that's the case.
Finally, how do you want all of this displayed in a visual? It seems that you want to create a timeline as your X-axis, and sum up the per day value of all active contracts. If this is not correct and you want to display this in some sort of table visual, please let me know.
- Currently, you can calculate the per day value of a contract