Forum Discussion
Condition ($ <>) in the expression
- 10 years ago
It sounds like you need an ALL or ALLEXCEPT clause in your SUM calculation. Generally, you do this by wrapping the SUM in a CALCULATE like:
CALCULATE(SUM(VI_ReceitaPrevista),ALL(table))
Basically, the ALL and ALLEXCEPT clauses create an context for the SUM that is independent of other contextual filters that may be applied, like from slicers. Can't really get too specific without sample data.
It sounds like you need an ALL or ALLEXCEPT clause in your SUM calculation. Generally, you do this by wrapping the SUM in a CALCULATE like:
CALCULATE(SUM(VI_ReceitaPrevista),ALL(table))
Basically, the ALL and ALLEXCEPT clauses create an context for the SUM that is independent of other contextual filters that may be applied, like from slicers. Can't really get too specific without sample data.
- Anonymous10 years agoNot applicable
That was exactly what I needed, thank you
- Anonymous10 years agoNot applicable
Did a test here after I applied the solution, calcaulate function (all ()) solves the problem of being presented zero when filtered dimension in my case a month dimension however when it is filtered a month that there was change and the value is not changed, for example, in January there was no movement and so when filtered it is presented to zero and should be shown the total value of the year with the function all this problem was solved however when I filter the month of February there was drive the still displayed value is the total of the year and in fact should be presented the value of the current year in February.
Briefly function cancels all the filter made of the size I expecificar the expression, in this case how could I fix this?
Follow my expression:
Budgeted Current = CALCULATE (if (ISBLANK (Sum (Facts [Budgeted Initial]) + Sum (Facts [Vl_Suplementado]) - Sum (Facts [Vl_Reduzido])); 0; (Sum (Facts [Budgeted Initial]) + Sum (Facts [Vl_Suplementado]) - Sum (Facts [Vl_Reduzido]))), ALL (DMEGF_Mes [Month]))
- Greg_Deckler10 years ago
Community Champion
Try changing your ALL to ALLEXCEPT, see documentation here:
https://msdn.microsoft.com/en-us/library/ee634795.aspx
- Anonymous10 years agoNot applicable
I tried ALL EXCEPT but the displayed value is reset