Forum Discussion
All not removing filter context? Help
- 4 years ago
Hi,
The problem is likely caused by this part of your DAX:
&& 'Relatório'[Empresa] IN VALUES ( 'Relatório'[Empresa] )
Now the table expression VALUES ( 'Relatório'[Empresa] ) is affected by filters -> if your filters cause this table to be blank it will in turn cause your calculation to fail.
Example of similar DAX:Value-2 = CALCULATE(SUM('Dateadd-2'[Value]),filter(ALL('Dateadd-2'),'Dateadd-2'[Date] in VALUES('Dateadd-2'[Date])))By slicing the date VALUES('Dateadd-2'[Date]) will return a blank table and thiss will cause everything else to be blank:
If we use ALL instead of VALUES the problem is gone:
Value-2 =CALCULATE(SUM('Dateadd-2'[Value]),filter(ALL('Dateadd-2'),'Dateadd-2'[Date] in ALL('Dateadd-2'[Date])))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/
Hi,
The problem is likely caused by this part of your DAX:
&& 'Relatório'[Empresa] IN VALUES ( 'Relatório'[Empresa] )
Now the table expression VALUES ( 'Relatório'[Empresa] ) is affected by filters -> if your filters cause this table to be blank it will in turn cause your calculation to fail.
Example of similar DAX:
By slicing the date VALUES('Dateadd-2'[Date]) will return a blank table and thiss will cause everything else to be blank:
If we use ALL instead of VALUES the problem is gone:
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/
Still trying to digest the information. But I sort of understand. And the problem was indeed the the part you mention. Genius!