The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello everyone.
I have been faced a problem as below details:
I have a timesheet table for our projects containing Month, Project Code and the total hours spent on each project monthly.
in another table, I have a financial transaction table which the costs, revenue, overhead etc are measured.
these two tables are not related in model.
the third table is connecting to both named project master.
it is a list of project with names and details (type, short name, code etc) which is connected to timesheet table through project code column and also to transaction table.
I want to create an allocated measure that allocates the overhead expenses to each project, based on the percent of their hours.
I created a measure for calculating the percent of total for each project as below:
@Amin_Adham , the above seem like a column not measure , measure should be like
Total Hours = CALCULATE(
Sum('01- Project Hours'[Hours]) ,
ALL(
'01- Project Hours'[Project Code],
'01- Project Hours'[Year],
'01- Project Hours'[Month]
)
)
and then:
Percent of total = divide(sum('01- Project Hours'[Hours]),[Total Hours])
Try the above and check
Hi Dear Amit and thanks for the respond and considration.
the measures are fine. I didnt use the SUM before '01- Project Hours'[Hours] because it was a measure itself.
I forgot to mention I had another measure called: Hours wich is:
the next Measure I created is:
Kindly Please advise.