Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How to plot the inventory trend amount by month ?

Hi All

 

My inventory data as per yollow high lighted column :-

 

 

i am able to get current stock amount and LYTD.

i need to plot my inventory trend.  

 

My PBI file :-

https://www.dropbox.com/s/b5tje5faimay99c/preWebinarPostCal_PY_DATA%20V007.pbix?dl=0

 

Hope some one can help me

 

Paul

  • Anonymous 

     

    Probably you are looking for cumulative values:

     

    See fomula below:

    Inventory Trend =
    CALCULATE (
        SUM ( INVENTORY[YTD] ),
        FILTER (
            ALL ( INVENTORY ),
            INVENTORY[Posting Date] <= MAX ( INVENTORY[Posting Date] )
                && NOT ( ISBLANK ( ( INVENTORY[GL Code] ) ) )
        )
    )

3 Replies

  • themistoklis's avatar
    themistoklis
    Icon for Community Champion rankCommunity Champion

    Anonymous 

     

    Probably you are looking for cumulative values:

     

    See fomula below:

    Inventory Trend =
    CALCULATE (
        SUM ( INVENTORY[YTD] ),
        FILTER (
            ALL ( INVENTORY ),
            INVENTORY[Posting Date] <= MAX ( INVENTORY[Posting Date] )
                && NOT ( ISBLANK ( ( INVENTORY[GL Code] ) ) )
        )
    )
    • Anonymous's avatar
      Anonymous
      Not applicable

      WOW another expert. Thank you sir

       

  • Anonymous , This cumulative, YTD will date tbale

     

    YTD Sales = CALCULATE(SUM(Table[C/D]),DATESYTD('Date'[Date],"12/31"))
    Last YTD Sales = CALCULATE(SUM(Table[C/D]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))

     

    cumulative with date table

    Cumm Sales = CALCULATE(SUM(Table[C/D]),filter(allselected(date),date[date] <=max(date[date])))
    Cumm Sales = CALCULATE(SUM(Table[C/D]),filter(allselected(date),date[date] <=max(Table[Date])))