Forum Discussion

hamishpolson's avatar
hamishpolson
Regular Visitor
6 years ago
Solved

ALLEXCEPT not working

I am trying to remove row context of specific columns. I am trying to return a % of total sales relevent to a specific sales channel for each product. In otherwords every product when viewed across e...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Probably something like this:

    [Total] = SUM( Data[Dollars] )
    
    [Dol SOT CY] = 
    VAR __totalAcrossMarkets = 
        CALCULATE(
            [Total],
    		VALUES( Data[Product] ),
    		ALL( Data )
    	)    
    VAR __currentTotal = [Total]
    VAR __result =
    	DIVIDE( __total, __totalAcrossMarkets )
    RETURN
    	__result

     

    Best

    D