Forum Discussion
nmaddock
7 years agoHelper I
DAX calculation in a different context
Hi, Im trying to calculate Kg's per M3 for industry types based on all the jobs we have already done and then use this value in a report in a different context. i'e' in the context of a service a...
- 7 years ago
Hello nmaddock
You can use ALLSELECTED over your table to achieve your goal.
KG's Per M3 = IF ( NOT ISBLANK ( [Total Weight] ), CALCULATE( DIVIDE([Total Weight], DIVIDE([Total Volume],1000)) ,ALLSELECTED(Agreement) ) )
nmaddock
7 years agoHelper I
The KG's Per M3 is supposed to be based on all the jobs of an industry type, for Cafe is think it was 91.15. so as long as the agreement is of type Cafe I want the 'KG's Per M3' for that industry type to be displayed.
nmaddock
7 years agoHelper I
If I select a specific sales agent this also changes the value, the Kg's per M3 is supposed to be a fixed value regardless of the other filters on the page as its needs to be based on all the jobs with a weights greater than 1 / volum / 1000 based on the industry type