Forum Discussion
Quick calc percentage monthly
- 9 years ago
Hi manoplaeli
I think I misunderstood your problem initially.
I have partially used Query Editor to get the correct results.
I have pivoted the hours column to get the correct data structure in order to solve this problem. There are other solutions as well but I find this convenient.
Pivot
Then I have created 3 calculated columns to get the Share and Direct % as shown below.
Results of the pivot columnSHARE%
Thanks, BhaveshPatel
Below is the fomular in my table. It only show me Direct Cost.
DirectHours = CALCULATE(SUM('Timesheet Details TSR01'[Hours]),FILTER('Timesheet Details TSR01','Timesheet Details TSR01'[Cost]="Direct Cost"))
ShareHours = CALCULATE(SUM('Timesheet Details TSR01'[Hours]),FILTER('Timesheet Details TSR01','Timesheet Details TSR01'[Cost]="Share Cost"))
Percentage = DIVIDE([DirectHours],[ShareHours],2)
Are you writing measures??
- manoplaeli9 years ago
Helper II
Yes I wrote in meansure
- BhaveshPatel9 years ago
Super User
Hi manoplaeli
I think I misunderstood your problem initially.
I have partially used Query Editor to get the correct results.
I have pivoted the hours column to get the correct data structure in order to solve this problem. There are other solutions as well but I find this convenient.
Pivot
Then I have created 3 calculated columns to get the Share and Direct % as shown below.
Results of the pivot columnSHARE%
- manoplaeli9 years ago
Helper II