Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
HI,
Can anyboday help me out to calculate % Gap in data.
I am sharing screenshot of sample dataset and also "Expected Answer" column in data.
I have also shared formula used to calculate this column.
Below is the screenshot of the data.
Thanks In Advance,
Rahul M
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
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
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
93 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |