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
I need help in that when I try to apply a BI filter it removes those items from the pivot table and then returns an infinity response.
VOS as a % of Budget Income = SUM('Budget'[02-2022R]) / CALCULATE(sum('Budget'[02-2022R]),FILTER(ALLSELECTED('Chart of Accounts'),'Chart of Accounts'[Type] = "Income")) * -100
Solved! Go to Solution.
Hi, @PamLeek ;
In your case, because your dax 's conditional is [Type]="Income" and use allselected(), however you only filter [Type]="Variable Opreating", so CALCULATE(sum('Actual'[P&L Amount]),FILTER(ALLSELECTED('Chart of Accounts'),'Chart of Accounts'[Type] = "Income")) * -100 return 0. Because these two conditions are in conflict.
so i think you could modify the measure :
VOS as a % of Budget Income =
SUM ( 'Budget'[02-2022R] )
/ CALCULATE (
SUM ( 'Budget'[02-2022R] ),
FILTER ( ALL ( 'Chart of Accounts' ), 'Chart of Accounts'[Type] = "Income" )
) * -100
VOS as a % of Income =
SUM ( 'Actual'[P&L Amount] )
/ CALCULATE (
SUM ( 'Actual'[P&L Amount] ),
FILTER ( ALL ( 'Chart of Accounts' ), 'Chart of Accounts'[Type] = "Income" )
) * -100
Looking forword to your reply!
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @PamLeek ;
In your case, because your dax 's conditional is [Type]="Income" and use allselected(), however you only filter [Type]="Variable Opreating", so CALCULATE(sum('Actual'[P&L Amount]),FILTER(ALLSELECTED('Chart of Accounts'),'Chart of Accounts'[Type] = "Income")) * -100 return 0. Because these two conditions are in conflict.
so i think you could modify the measure :
VOS as a % of Budget Income =
SUM ( 'Budget'[02-2022R] )
/ CALCULATE (
SUM ( 'Budget'[02-2022R] ),
FILTER ( ALL ( 'Chart of Accounts' ), 'Chart of Accounts'[Type] = "Income" )
) * -100
VOS as a % of Income =
SUM ( 'Actual'[P&L Amount] )
/ CALCULATE (
SUM ( 'Actual'[P&L Amount] ),
FILTER ( ALL ( 'Chart of Accounts' ), 'Chart of Accounts'[Type] = "Income" )
) * -100
Looking forword to your reply!
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @amitchandak That doesn't seem to work either. See below I have Income in the table and the percentage (using my old calculation) works
but when i remove the income from the table (filter it out) it dissappears
@PamLeek , example 1 or the two ways
VOS as a % of Income =
var _1 = SUM('Actual'[P&L Amount])
var _2 = CALCULATE(sum('Actual'[P&L Amount]),FILTER(ALLSELECTED('Chart of Accounts'),'Chart of Accounts'[Type] = "Income"))
return
divide(_1,_2)
or
VOS as a % of Income =
var _1 = SUM('Actual'[P&L Amount])
var _2 = CALCULATE(sum('Actual'[P&L Amount]),FILTER(ALLSELECTED('Chart of Accounts'),'Chart of Accounts'[Type] = "Income"))
return
if(isblank(_2) , divide(_1,_2) )
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 | |
97 | |
75 | |
65 | |
53 |
User | Count |
---|---|
144 | |
103 | |
98 | |
85 | |
64 |