TimeSum for a specific line item

DeveloperCYT
edited January 31 in Modeling

First Module
List: SKU's
Dimension : weeks
Line item: Volume
Second Module
List: 1- 100 ( a list of the numbers 1 to 100)
Line items: Start week, End week, SKU, Item
I want a timesum in the second Module from the first module
TIMESUM('Volume Module'.'Volume', Start Week[LOOKUP: Item], End Week[LOOKUP: Item])
This works for the times, but I get the total for all SKu's. I cannot add a lookup to the Volume Module,
TIMESUM('Volume Module'.'Volume'[LOOKUP: Sku], Start Week[LOOKUP: Item], End Week[LOOKUP: Item])

Lookups can't be used in the first parameter of a timesum

I can't add the 1-100 and SKU list as a line item dimension as the module will become very very large.

Any suggestions?

Best Answer

  • Hi @DeveloperCYT,
    You can achieve this by breaking the formula into 2 lines as follows-

    Create 1 more line item in the first module with time dimension but no SKU dimension, create a new line item called "Volume selected SKU" with the formula Volume [Lookup:SKU]

    Now in the 2nd module, use timesum on the new line item.

Answers

  • Hi, that gives me an error.

    "Dimension of mapping used for lookup doesn't match any dimension of the result"


    I defined the SKU using a line item SKU: Item(Sku List)… no other way to LOOKUP a list item that I am aware of

    Then used Volume[LOOKUP: SKU] in line item with time and no SKU reference

    If you tested can you share your module formulas, see what i am doing wrong, thanks.

  • Hi, you need to create a line item in a SYS lookup module.

    SYS lookup module - No dimension. Create a line item, format = SKU list.
    Select the SKU you want to lookup & sum & then refer to this in the formula.

  • Thanks I have this working now, with a slight variation to your first suggestion