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
Anonymous
Not applicable

cumulative total on the basis of date slicer

Hi,

 

My desired result is to get a row in the report in PowerBI desktop with two columns Item Number and Quantity where the quantity should be cumulative on the basis of date as a slicer. (For example: If I select a date, say 10-02-2020 in the slicer then the report should show only a single row with the columns, Item number 41225 and Quantity 25). For reference, the below dataset is there.

 

Kindly help how to achieve the desired result, whether I should write a Dax or any other way. 

 

Item number Date Quantity 
41225 10-01-2020 5 
41225 10-02-2020 15 
41225 10-04-2020 -5 
41225 10-08-2020 25 
41225 10-10-2020 -5 

 

 

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@Anonymous 
You can create a measure, I guess you mean Quantity = 20 if you select 2020.10.2

 

Measure = CALCULATE(SUM([Quantity]),FILTER(ALL('Table'),[Date]<=MAX([Date])))

 

V-pazhen-msft_0-1607579218899.png

V-pazhen-msft_0-1607579066330.png

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Paul Zheng,

 

Thank You for your support.

V-pazhen-msft
Community Support
Community Support

@Anonymous 
You can create a measure, I guess you mean Quantity = 20 if you select 2020.10.2

 

Measure = CALCULATE(SUM([Quantity]),FILTER(ALL('Table'),[Date]<=MAX([Date])))

 

V-pazhen-msft_0-1607579218899.png

V-pazhen-msft_0-1607579066330.png

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

Just drag Date to a slicer and drag Quantity to a visual and you are done

Anonymous
Not applicable

NO only drag will not give the cumulative of quantity depending on the slicer.

Helpful resources

Announcements
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.

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.