locked
Inventory problem RRS feed

  • Question

  • Hello,

    I am moving from SSAS MDX to Powerpivot (DAX).

    I have an inventory calculation that is based on mutations. The calculation looks like this.

    Inventory = AGGREGATE ( {NULL:[Dimension Time].[Time].Currentmember} , [Measures].[Mutations] )

    With this I can calculate the inventory on any given time. How do I do this in DAX ?

    Thanks in advance,

    Constantijn


    Wednesday, August 31, 2016 1:07 PM

Answers

  • Never mind I found it

    # Inventory = CALCULATE(
      sum('Inventory'[Mutations]);
      FILTER(all('Dimension Time'[TimeKey]); 'Dimension Time'[TimeKey]<=max('Dimension Time'[TimeKey]))
    )

    Thursday, September 1, 2016 9:21 AM