Forum Discussion
CALCULATE DOES NOT FILTER AS INTENDED
- 2 years ago
Hi,
You can use ALL to remove only the location: ALL( [<table> | <column>[, <column>[, <column>[,…]]]] )
[Sales all locations] = CALCULATE(SUM('Master Capacity'[weekly capacity]), ALL('Master Capacity'[location]))
Hi,
You need to add function such as ALL or REMOVEFILTERS:
ALL function (DAX) - DAX | Microsoft Learn
CALCULATE function (DAX) - DAX | Microsoft Learn
REMOVEFILTERS function (DAX) - DAX | Microsoft Learn
In addition to this I recommend having separate measures which you would refer in this measure. E.g.
[Sales all] = CALCULATE(SUM('Master Capacity'[weekly capacity]), ALL('Master Capacity'))
[Sales selected] =SUM('Master Capacity'[weekly capacity])
[Sales apac] = CALCULATE(SUM('Master Capacity'[weekly capacity]), ALL('Master Capacity'),'Location'[[location region] (groups)]="APAC")
[Sales diff] = [Sales selected] - [Sales apac]
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
- ValtteriN2 years ago
Community Champion
Hi,
You can use ALL to remove only the location: ALL( [<table> | <column>[, <column>[, <column>[,…]]]] )
[Sales all locations] = CALCULATE(SUM('Master Capacity'[weekly capacity]), ALL('Master Capacity'[location]))