Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

CALCULATE ALL BUG

I'm experiencing erratic results from CALCULATE(measure, ALL(field)) statements when using page filters to filter other fields with a large number of distinct values. The problem also occurs if positive fields are filtered with ">-1". The problem is fixed/reduced if the field is replaced by a rounded version (i.e. fewer distict values), but can reoccur when using several page-filters.

 

An example can be constructed as follows:
Generate a data set containing 100 000 rows with the following fixed values (easy in Excel):

RandomValue=INT(RAND()*10000)

RandomRounded=ROUND(RandomValue,-3)

Group=INT(RAND()*3)

Value=INT(RAND()*10000)

 

Then construct the following measure

SumValueIgnoringGroup = calculate(sum(Data[Value]),all(Data[Group])) and use this in a Card.

Add a chart using the group-field - and see that the Card is unaffected by filtering (as it should be).

The try adding a pagefilter to filter for RandomValue>-1 and see how the Card is erronously affected when you click on the groups.

If you filter RandomRounded >-1 the Card works ok.

 

Status: New
Comments
v-chuncz-msft
Community Support
christianirgens
Frequent Visitor

Thanks, auto-exist explains the problem (and probably why rounding sometimes helps)  - but I'd say a bug by design is still a bug...

Is the suggested workaround to move/copy all fields used in ALL statements to individual tables (one table per field)?