Forum Discussion
Calculation Error in power BI
Hi Anonymous,
You can create a calculated column use DIVIDE() function with DAX below:
Expected Answer=Divide([Gap(Actual - Plan)],[Plan Value])
Reference:
https://docs.microsoft.com/en-us/power-bi/desktop-tutorial-create-calculated-columns
Best Regards,
Qiuyun Yu
Hi,
thanks for reply.
I have tried this already but didint work actually..
I have got solution for it instead of calculted column i used calculated measure for it and it works fine now.
Again thanks for it.
Regards,
Rahul M
- v-qiuyu-msft8 years ago
Community Support
Hi Anonymous,
Glad to hear the issue is fixed now. It would be better if you could share the measure which will benefit other communities who have the same issue.
Best Regards,
Qiuyun Yu- Anonymous8 years agoNot applicable
HI All,
Sorry for late post of solution.
I have created new quick measure option. then i selected filtered value, from which i am able to calculate value for "yes" which is "plan value" and value for "No" which is "Actual value"....so i get two measure here i.e plan value and actual value.
After above step is done,
I simply calculate GAP between two by using formula Gap(Actual-Plan) = [Matric_Value for NO]-[Matric_Value for Yes]
Note: Matric_Value for NO=Plan Value and Matric_Value for YES= Actual Value
Next and final step is to calculate Difference % y suing formula % Gap(Actual-Plan) = IFERROR([Gap(Actual-Plan)]/'rpt_Actual_vs_plan (2)'[Matric_Value for Yes],0)
Below is the output screenshot.
Thanks,
Rahul M