Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

How to plot the inventory trend amount by month ?

Hi All

 

My inventory data as per yollow high lighted column :-

 

Paulyeo11_0-1602671525865.png

 

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

1 ACCEPTED SOLUTION
themistoklis
Community Champion
Community 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] ) ) )
    )
)

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@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])))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
themistoklis
Community Champion
Community 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
Not applicable

WOW another expert. Thank you sir

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.