Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi everyone,
I need some help on my Power BI.
I am trying to spread the value of a project over several months, to know exactly how much I will have to produce every month.
For exemple, if I have a project sold at 60,000$ over 3 months, I will have to produce 20,000$ per month.
This is the data I have :
Project | Order Date | Delivery | Amount |
1656KL | 5-Jan-2020 | 4-May-2020 | $100,000.00 |
1568MP | 8-Feb-2020 | 3-Apr-2020 | $85,000.00 |
1518KI | 18-Feb-2020 | 30-Apr-2020 | $120,000.00 |
5168GT | 21-Mar-2020 | 21-Jun-2020 | $50,000.00 |
This is the output i'm looking for :
Project Number | January | February | March | April | May | June | Total |
1656KL | $21,666.67 | $24,166.67 | $25,833.33 | $25,000.00 | $3,333.33 | $100,000.00 | |
1568MP | $32,454.55 | $47,909.09 | $4,636.36 | $85,000.00 | |||
1518KI | $18,333.33 | $51,666.67 | $50,000.00 | $120,000.00 | |||
5168GT | $5,434.78 | $16,304.35 | $16,847.83 | $11,413.04 | $50,000.00 |
Of course every project doesn't start at the same date, not even on the first day of the month. So the amount allocated to each month has to take in consideration the number of day in each month.
I hope i'm clear enough, don't hesitate to ask me more questions about this.
Thank you very much for your help.
Nicholas
Hi,
I think your calculation of amount per day is incorrect. For the first project, it should be 100000/121 = 826.4463 and not 100000/120=833.3333. You may download my PBI file from here.
Hope this helps.
Ashish:
The image you posted, shown below, had the correct "Total values".
The values in the file uploaded by someone else (URL below) had incorrect Total values, please see the screen shot below.
I was curious how you corrected this.
Thanks,
Edward
Hi,
I cannot understand your question. Offer a simple explanation and show the expected result.
Ashish:
Hello. I could not download the file with the link you provided.
Can you please advise what change you made to the DAX Measure "MonthAmount"?
Thanks,
Edward
Hi,
I do not have that file anymore. Describe the question and show the expected result.
Hi @Anonymous ,
We can create a calculated table and a measure to meet your requriement:
Calculated Table:
DateTable = CALENDAR(MIN('Table'[Order Date]),MAX('Table'[Delivery]))
Measure:
MonthAmount = SUMX(DISTINCT('Table'[Project]),
CALCULATE(SUM ( 'Table'[Amount] ))
/ DATEDIFF ( MIN ( 'Table'[Order Date] ), MAX ( 'Table'[Delivery] ), DAY )
* COUNTROWS(INTERSECT('DateTable',CALENDAR(MIN('Table'[Order Date])+1,MAX('Table'[Delivery])))))
Best regards,
Hi!
Thank you so much for your post - it was of a great help!
Just one more thing, is there a way to make the spread throughout the months flat? Instead of calculating the volume per month by multipling the days, we have the entire year volume just divided by 12 and than, only showing this "flat volume" at the intersection of the months between "Order date" and "Delivery Date"?
Once again, thank you so much for your kind help!
This solution is really useful for my use case too. I don't suppose you would mind taking the time to explain how it works? Or link to the material where you got this from yourself?
Hi @v-lid-msft
Thanks a lot for this solution, I managed to apply it on my Power BI.
Just two questions :
- What is your first picture about ? what are TAB_Litig_File and TAB_Prov ?
- Would it be possible to have a column with every amount for every month for each project ? I need this information to create another Matrix Table, in order to compare with my maximum production capacity.
Thanks again for your help.
Nicho
Hi @Anonymous ,
How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?
Best regards,
Hi @Anonymous ,
Sorry for that we put an unnessary screenshot, we selected wrong file when upload, it does not help in this post.
What is the column with every amount, Could you please share a mockup table based on the tables you have shared?
Best regards,
Hi,
This is kinda complexed. You need to create more rows in powerQuery.
Create a blank Query and copy this code.
When you understand It you can applie it to your orginal code.
Hope this can help you.
/Adam
Hi @Adamtall , Thank you very much for your answer.
I'm not sure to understand entirely your code, but i'm gonna try to apply it to my case and test it.
I can see on your screenshot it worked so it should on mine too !
I'll let you know, thanks again for your time.
Nicho
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
147 | |
85 | |
66 | |
52 | |
46 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |