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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
wisekyn77
New Member

Cummulative sum of previous Months

I am creating a matrix table with name, item ID, Item description on rows. 
Month-Year = FORMAT('Data'[Planned Date],"mmm yyyy") on columns and supply qty in values

Capture.PNG
I want a dax formula which will results in 
customer namevendor item iditem iddescJan-24Feb-24Mar-24
    501015

Since we are in Jan 2024...It will give the sum of of all prior supply qty value that is 5+13+12+20=50.

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@wisekyn77 

Try this meaure:

YourMeasure =
IF (
    MONTH ( SELECTEDVALUE ( 'Data'[Planned Date] ) ) = 1,
    CALCULATE ( [Measure], 'Data'[Planned Date] <= MAX ( 'Data'[Planned Date] ) ),
    [Measure]
)
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

1 REPLY 1
Fowmy
Super User
Super User

@wisekyn77 

Try this meaure:

YourMeasure =
IF (
    MONTH ( SELECTEDVALUE ( 'Data'[Planned Date] ) ) = 1,
    CALCULATE ( [Measure], 'Data'[Planned Date] <= MAX ( 'Data'[Planned Date] ) ),
    [Measure]
)
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Top Solution Authors