Forum Discussion
WTD running total based on DIVIDE
Hello everyone!
I have a measure that shows me the daily budget level based on a weekly target:
Sales Phasing = DIVIDE([Budget], [# Working Days per Week])
[Budget] is a column based on a year-week granularity.
To get the daily target I divide the budget by the number of working day per week.
Now I would like to accumulate this daily budget by month.
Something like:
| Date | Daily Budget | MTD Budget |
| 01.01.2019 | 50 | 50 |
| 02.01.2019 | 50 | 100 |
| 03.01.2019 | 25 | 125 |
How would you do that?
I guess a simple running total will not work based on the result of a DIVID function, right?
This is my MTD measure for the actual sales:
Sales MTD =
CALCULATE (
[Sales],
FILTER (
ALL ( 'Calendar' ),
'Calendar'[Fiscal Year]
= MAX ( 'Calendar'[Year] )
&& 'Calendar'[Date]
<= MAX ( 'Calendar'[Date] )
&& 'Calendar'[Fiscal Month Number]
= MAX ( 'Calendar'[Fiscal Month Number] )
)
)
4 Replies
- amitchandak
Super User
joshua1990 , refer if this file can help
https://www.dropbox.com/s/fnq82ksdzk1lqs3/Target_allocation_daily.pbix?dl=0
- joshua1990
Post Prodigy
amitchandak Thanks for your help!
In your provided file I can't find a running total measure, just da daily target allocation.
Cou you please help?
- amitchandak
Super User
joshua1990 , allocate it daily and WTD /MTD as a measure.
You have given output
Can you share sample data and sample output in table format?
- AnonymousNot applicableThat's actually very easy once you start thinking in Power BI and DAX terms. You need daily target? Then create a table that will store each and every day in the range you want and assign the right amount to these days. Then connect to the table a Date table and you'll be able to aggregate any way you want and create any measures quickly and simply. Please do not make mistakes that so many do because their thinking is rigid. Simpler DAX means easier to understand and faster to execute.