Forum Discussion
Measure for Expenses Vs Budget
- 5 years ago
Hi pfarahani ,
According to your description, whether it is column or measure, a field type can only be the same. Therefore, even if the judgment condition is used, the result of percentage and numeric value cannot be displayed in the same column.
Two different results can only be obtained in the following ways, refer to the following:
Measure = var a = CALCULATE(SUM('Table'[Actual Expense]),ALLEXCEPT('Table','Table'[Fiscal Year])) var b = CALCULATE(SUM('Table'[Budget Expense]),ALLEXCEPT('Table','Table'[Fiscal Year])) return IF(b>a,(b-a)/b,0)Measure = var a = CALCULATE(SUM('Table'[Actual Expense]),ALLEXCEPT('Table','Table'[Fiscal Year])) var b = CALCULATE(SUM('Table'[Budget Expense]),ALLEXCEPT('Table','Table'[Fiscal Year])) return IF(b>a,0,-(b-a))
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi pfarahani ,
According to your description, whether it is column or measure, a field type can only be the same. Therefore, even if the judgment condition is used, the result of percentage and numeric value cannot be displayed in the same column.
Two different results can only be obtained in the following ways, refer to the following:
Measure =
var a = CALCULATE(SUM('Table'[Actual Expense]),ALLEXCEPT('Table','Table'[Fiscal Year]))
var b = CALCULATE(SUM('Table'[Budget Expense]),ALLEXCEPT('Table','Table'[Fiscal Year]))
return
IF(b>a,(b-a)/b,0)
Measure =
var a = CALCULATE(SUM('Table'[Actual Expense]),ALLEXCEPT('Table','Table'[Fiscal Year]))
var b = CALCULATE(SUM('Table'[Budget Expense]),ALLEXCEPT('Table','Table'[Fiscal Year]))
return
IF(b>a,0,-(b-a))
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.