Forum Discussion
Anonymous
7 years agoNot applicable
Power BI Desktop - DAX Issue
Dear Team, In DAX calculation, I found one weird case, just wanted to filter the data on some condition. Here is the DAX that was written - CALCULATE(SUM(FactTotal[Sales]), FILTER(FactTotal, Fa...
- Anonymous7 years ago
It's the way DAX works internally. Your second function:
CALCULATE(SUM(FactTotal[Sales]), FactTotal[Key] = 1) is really CALCULATE( SUM( FactTotal[Sales]), FILTER( ALL(FactTotal), FactTotal[Key] = 1 ) )so all removes the current filters and applies you FactTotal[Key] = 1 filter.
Anonymous
7 years agoNot applicable
It's the way DAX works internally. Your second function:
CALCULATE(SUM(FactTotal[Sales]), FactTotal[Key] = 1)
is really
CALCULATE(
SUM( FactTotal[Sales]),
FILTER(
ALL(FactTotal),
FactTotal[Key] = 1
)
)so all removes the current filters and applies you FactTotal[Key] = 1 filter.