Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Week over Week % change with Slicer capability

I am trying to create a waterfall chart which displays week over week % changes in inventory sliced by Customer_Name and DMA_Code.  I have tried using example from previous posted solutions, but not getting what I need.

The following provides the numbers but the slicer choices all show the same values.

Using:

WoW Change =
VAR lastWeekAmount =
CALCULATE (
SUM ( INVENTORY[INVENTORY]),
FILTER (
ALL ( 'INVENTORY' ),
'INVENTORY'[Weeknum]
= MIN ( 'INVENTORY'[Weeknum] ) - 1
)
)
RETURN
DIVIDE ( SUM ( INVENTORY[INVENTORY] ) - lastWeekAmount, lastWeekAmount, 0 )
 
On this table:
 
 
  • Anonymous 

    Try 

    WoW Change =
    VAR lastWeekAmount =
    CALCULATE (
      SUM ( INVENTORY[INVENTORY]),
      FILTER (
       ALLSELECTED ( 'INVENTORY' ),
       'INVENTORY'[Weeknum] = MIN ( 'INVENTORY'[Weeknum] ) - 1
      )
    )
    RETURN
    DIVIDE ( SUM ( INVENTORY[INVENTORY] ) - lastWeekAmount, lastWeekAmount, 0 )

     

    ________________________

    If my answer was helpful, please consider Accept it as the solution to help the other members find it

    Click on the Thumbs-Up icon if you like this reply 🙂

    YouTube  LinkedIn

1 Reply

  • Anonymous 

    Try 

    WoW Change =
    VAR lastWeekAmount =
    CALCULATE (
      SUM ( INVENTORY[INVENTORY]),
      FILTER (
       ALLSELECTED ( 'INVENTORY' ),
       'INVENTORY'[Weeknum] = MIN ( 'INVENTORY'[Weeknum] ) - 1
      )
    )
    RETURN
    DIVIDE ( SUM ( INVENTORY[INVENTORY] ) - lastWeekAmount, lastWeekAmount, 0 )

     

    ________________________

    If my answer was helpful, please consider Accept it as the solution to help the other members find it

    Click on the Thumbs-Up icon if you like this reply 🙂

    YouTube  LinkedIn