Forum Discussion
Calculation group using filter modifier looks like a bug
Hi again Anonymous
I have tried to isolate the conditions required to reproduce this bug, so I created a very simple PBIX to demonstrate the issue (attached).
To reproduce this apparent bug, I believe these are the requirements:
- Create a calculation group with a calculation item that uses ALLSELECTED (), the simplest example being:
CALCULATE ( SELECTEDMEASURE(), ALLSELECTED () ) - Create a a matrix with at least two fields in the Rows field well.
- Place a measure which itself does not use ALLSELECTED in the Values field well.
- Apply the above calculation item as a filter to the matrix visual.
- Expand the rows of the matrix in a "ragged" fashion, so that some branches are expanded to lower levels than others.
The bug can be avoided by removing any of the above conditions, for example:
- Expanding all branches of the matrix to the same level
- Including a measure in the matrix that does use ALLSELECTED, even in a trivial way, such as
Sales Modified = SUM ( Sales[Sales] ) + CALCULATE ( BLANK(), ALLSELECTED () )
Does this sound right?
I intend to raise this as an issue. Let me know if you have any other thoughts 🙂
My takeway at the moment is that it is risky to use ALLSELECTED () within calculation items.
Regards
- denis_Co3 years agoNew Member
Thank you, very interesting solution for avoiding the bug.
- QueryQueen2 years agoRegular Visitor
I ran into this bug just today and I can confirm that as of April 2024, it is still not fixed. The good news is that OwenAuger's workaround also still works.
Very nasty issue that silently produces incorrect numbers.