Forum Discussion
Anonymous
5 years agoNot applicable
remove filter not working
I'm currently writing a DAX that will get the percentage between the total and the filtered amount.
This is what I have so far:
Totals =
var ABC = '_sp-Total Invoiced to Date - Current Month'[Total Invoiced Current] - [Current Cost & Expense]
RETURN divide((CALCULATE(ABC, REMOVEFILTERS('_sp-Opportunity Fees and Variations'[NAME]))) , (CALCULATE(ABC, ALLSELECTED('_sp-Opportunity Fees and Variations'))))
The problem is regardless of what filter I select I always get 100%.
I tried creating a separte measure and still the REMOVEFILTERS is not working.
Div1 =
var ABC = '_sp-Total Invoiced to Date - Current Month'[Total Invoiced Current] - [Current Cost & Expense]
return (CALCULATE(ABC, REMOVEFILTERS('Projects'[Project Name])))
Thank you!
4 Replies
- wdx223_Daniel
Community Champion
CALCULATE function can not change the value of variables
- AnonymousNot applicable
- jameszhang0805
Resolver IV
Create a measure of ABC instead of variables and try again. Once a measure was calculated and assigned to variables, the value was static, CALCULATE function can not change the value of variables just like Daniel mentioned.