Forum Discussion
Perfect Difference Bar Chart
- 8 years ago
Hi shad_fz,
Follow below steps for calculating percentage difference.
1. Add New Column "Planned Hours"
Planned Hours = if('Planned Vs Actual'[Planned or Actual Hours]="Planned",'Planned Vs Actual'[Total Hours],0)2. Add New Column "Actual Hours"
Actual Hours = if('Planned Vs Actual'[Planned or Actual Hours]="Actual",'Planned Vs Actual'[Total Hours],0)3. Create a new Quick Measure. Right Click on Table name & select New Quick Measure
a. Select "Percentage Difference" under "Mathematical Operations".
b. Drag "Planned Hours" column to "Base Value".
c. Drag "Actual Hours" column to "Value to compare"
d. Blanks: Treat as zero in the calculation
4. This will add below measure to the table.
Actual Hours % difference from Planned Hours = VAR __BASELINE_VALUE = SUM('Planned Vs Actual'[Planned Hours]) VAR __VALUE_TO_COMPARE = SUM('Planned Vs Actual'[Actual Hours]) RETURN DIVIDE(__VALUE_TO_COMPARE - __BASELINE_VALUE, __BASELINE_VALUE)Please let me know if it helps.
Thanks,
Rahul
Hi shad_fz,
Follow below steps for calculating percentage difference.
1. Add New Column "Planned Hours"
Planned Hours = if('Planned Vs Actual'[Planned or Actual Hours]="Planned",'Planned Vs Actual'[Total Hours],0)2. Add New Column "Actual Hours"
Actual Hours = if('Planned Vs Actual'[Planned or Actual Hours]="Actual",'Planned Vs Actual'[Total Hours],0)3. Create a new Quick Measure. Right Click on Table name & select New Quick Measure
a. Select "Percentage Difference" under "Mathematical Operations".
b. Drag "Planned Hours" column to "Base Value".
c. Drag "Actual Hours" column to "Value to compare"
d. Blanks: Treat as zero in the calculation
4. This will add below measure to the table.
Actual Hours % difference from Planned Hours =
VAR __BASELINE_VALUE = SUM('Planned Vs Actual'[Planned Hours])
VAR __VALUE_TO_COMPARE = SUM('Planned Vs Actual'[Actual Hours])
RETURN
DIVIDE(__VALUE_TO_COMPARE - __BASELINE_VALUE, __BASELINE_VALUE)
Please let me know if it helps.
Thanks,
Rahul