The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi All!
i am trying to multiply the amount of days a piece of equipment was on a project by the AVG. cost of that equipment to achieve a total cost of plant on project.
the current formula to calculate Total project cost of plant is:
the problem i am experiencing is that Total Project Cost for Plant is Multiplying the Total sum of "Day Diary Plant Days" by the Total Sum of "AVG. Plant & Vehicle cost per day" so the total being applied is $1921.39 instead of the desired $65.87.
my data structure is below; with cost values being from the APPosted Invoices Query; and day docket master and plant list being the fact tables for project and plant;
total plant days is calculated by:
Day Diary Plant Days = CountRows(Filter(DayDiaryPlantList_Sharepoint,CONTAINS(DayDiaryMaster_Sharepoint,DayDiaryMaster_Sharepoint[Id],DayDiaryPlantList_Sharepoint[MasterID])))
Master list of Projects is in the Project Query, and master list of Equipment is in "Plant" Query
kind regards,
James
Solved! Go to Solution.
Hi @TamlerlovesKant ,
12605 is 2521*5, that is, the total of AVG Plant Cost per Day is multiplied by the total of Assigned Equipment Days.
You can create a new measure to get the results you want.
Measure = SUMX('Equipment List',[Plant Assigned Cost])
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. Please show the expected outcome.
Hi @lbendlin,
Thanks for getting in touch on this one; i have created a simplified and Sanitised Data model which can be viewed below:
https://1drv.ms/u/s!Aqcds9Zosni5iG0KXKTyExJSeeaD?e=mds6P7
The outcome i would like to achieve is
AVG plant cost per day * Assigned equipment days;
wherein apply the average daily cost of a piece of equipment (which is referencing the Invoices Column) and apply that value average value to a project whenever the piece of equipment is assigned to the project (using the day diary)
as you can see in the image below, it appears to be filtering and applying the values correct, but the total value for "Plant assigned cost" doesnt seem to add up properly;
the cost that i want applied to the project is 1502.67+641.33+1449.00 = $3593.00 but instead the total is $12605.00 and i cant figure out why?
Hi @TamlerlovesKant ,
12605 is 2521*5, that is, the total of AVG Plant Cost per Day is multiplied by the total of Assigned Equipment Days.
You can create a new measure to get the results you want.
Measure = SUMX('Equipment List',[Plant Assigned Cost])
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thankyou so much Stephen!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
78 | |
66 | |
52 | |
50 |
User | Count |
---|---|
121 | |
120 | |
78 | |
63 | |
62 |