Forum Discussion

nmaddock's avatar
nmaddock
Helper I
7 years ago
Solved

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...
  • jdbuchanan71's avatar
    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)
        )
    )